1
0
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:
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 {
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
}
}