1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-07-02 00:20:26 +08:00

fix(nat): hello packet dead loop

This commit is contained in:
源文雨
2025-02-23 00:25:01 +09:00
parent 60495227fc
commit 4b60801a0f
4 changed files with 21 additions and 8 deletions

View File

@@ -35,7 +35,7 @@ func (l *Link) keepAlive(dur int64) {
logrus.Infoln("[nat] re-connect me succeeded")
}
}
n, err := l.WriteAndPut(head.NewPacket(head.ProtoHello, l.me.srcport, l.peerip, l.me.dstport, nil), false)
n, err := l.WriteAndPut(head.NewPacket(head.ProtoHello, l.me.srcport, l.peerip, l.me.dstport, []byte{byte(head.HelloPing)}), false)
if err == nil {
logrus.Infoln("[nat] send", n, "bytes keep alive packet")
} else {