mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-21 02:40:24 +08:00
reduce ep change
This commit is contained in:
@@ -27,8 +27,10 @@ func (l *Link) onNotify(packet []byte) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
p, ok := l.me.IsInPeer(peer)
|
p, ok := l.me.IsInPeer(peer)
|
||||||
if ok {
|
if ok {
|
||||||
p.endpoint = addr
|
if p.endpoint.String() != ep {
|
||||||
logrus.Infoln("[notify] set ep of peer", peer, "to", ep)
|
p.endpoint = addr
|
||||||
|
logrus.Infoln("[notify] set ep of peer", peer, "to", ep)
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user