Cleanup - audit
This commit is contained in:
@@ -2,7 +2,6 @@ package peer
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/netip"
|
||||
"time"
|
||||
|
||||
"vppn/peer/control"
|
||||
@@ -51,15 +50,4 @@ func (a *App) onPing(e PingEvent) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
a.addProbe(peer, e.ping.SrcV4, e.ping.SrcV6)
|
||||
}
|
||||
|
||||
func (a *App) addProbe(peer *Peer, v4, v6 netip.AddrPort) {
|
||||
endpoint := preferredEndpoint(v4, v6)
|
||||
if !endpoint.IsValid() || endpoint == peer.PreferredEndpoint() {
|
||||
return
|
||||
}
|
||||
peer.UpdateEndpoints(v4, v6)
|
||||
a.devAddProbe(peer, endpoint)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user