1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-05 07:50:24 +08:00

fix ep set

This commit is contained in:
fumiama
2022-01-01 23:31:21 +08:00
parent 1991b22ff5
commit fd325dbe70

View File

@@ -33,7 +33,7 @@ func (m *Me) listen() (conn *net.UDPConn, err error) {
logrus.Debugln("[link] recv from endpoint", addr, "src", packet.Src, "dst", packet.Dst)
// logrus.Debugln("[link] recv:", hex.EncodeToString(lbf))
if ok {
if p.peerip == nil || p.peerip.String() != addr.String() {
if p.endpoint == nil || p.endpoint.String() != addr.String() {
logrus.Infoln("[link] set endpoint of peer", p.peerip, "to", addr.String())
p.endpoint = addr
}