1
0
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:
fumiama
2022-01-01 22:10:16 +08:00
parent dc9d37760a
commit eadf80c3f2

View File

@@ -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
} }
} }