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