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:
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user