mirror of
https://github.com/fumiama/WireGold.git
synced 2026-07-01 16:10:24 +08:00
fix(listen): ep logging
This commit is contained in:
@@ -166,10 +166,10 @@ func (m *Me) dispatch(packet *head.Packet, addr p2p.EndPoint, index int, finish
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if p.endpoint == nil || !p.endpoint.Euqal(addr) {
|
if p.endpoint == nil || !p.endpoint.Euqal(addr) {
|
||||||
if m.ep.Network() == "udp" {
|
if m.ep.Network() == "tcp" && !addr.Euqal(p.endpoint) {
|
||||||
logrus.Infoln("[listen] @", index, "set endpoint of peer", p.peerip, "to", addr.String())
|
logrus.Infoln("[listen] @", index, "set endpoint of peer", p.peerip, "to", addr.String())
|
||||||
p.endpoint = addr
|
p.endpoint = addr
|
||||||
} else if !addr.Euqal(p.endpoint) && p.rawep == "" { // tcp/ws, ep not registered
|
} else { // others are all no status link
|
||||||
logrus.Infoln("[listen] @", index, "set endpoint of peer", p.peerip, "to", addr.String())
|
logrus.Infoln("[listen] @", index, "set endpoint of peer", p.peerip, "to", addr.String())
|
||||||
p.endpoint = addr
|
p.endpoint = addr
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user