mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-23 20:16:27 +08:00
fix(nat): panic on notify nil
This commit is contained in:
@@ -97,6 +97,9 @@ func (l *Link) onQuery(packet []byte) {
|
|||||||
lnk, ok := l.me.IsInPeer(p)
|
lnk, ok := l.me.IsInPeer(p)
|
||||||
eps := ""
|
eps := ""
|
||||||
if l.me.ep.Network() == "udp" { // udp has real p2p
|
if l.me.ep.Network() == "udp" { // udp has real p2p
|
||||||
|
if lnk.endpoint == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
eps = lnk.endpoint.String()
|
eps = lnk.endpoint.String()
|
||||||
}
|
}
|
||||||
if eps == "" {
|
if eps == "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user