1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-04 23:40:26 +08:00

fix(nat): transport on tcp

This commit is contained in:
源文雨
2024-07-16 23:55:08 +09:00
parent 1bbec7f8f9
commit 0482f001ec

View File

@@ -92,10 +92,17 @@ func (l *Link) onQuery(packet []byte) {
notify := make(head.Notify, len(peers))
for _, p := range peers {
lnk, ok := l.me.IsInPeer(p)
eps := ""
if l.me.ep.Network() == "udp" { // udp has real p2p
eps = lnk.endpoint.String()
}
if eps == "" {
eps = l.rawep // use registered ep only
}
if ok {
notify[p] = [2]string{
lnk.endpoint.Network(),
lnk.endpoint.String(),
eps,
}
}
}