WIP
This commit is contained in:
@@ -19,7 +19,7 @@ func (a *App) onPing(e PingEvent) {
|
||||
// If we're the server, respond - this is always necessary as it's used to
|
||||
// know if peers are up or down.
|
||||
if peer.Role == control.Server {
|
||||
a.sendPing(peer, e.ping.ID, e.ping.PingTS)
|
||||
a.sendPing(peer, e.ping.PingTS)
|
||||
}
|
||||
|
||||
// Compute RTT from server echo.
|
||||
@@ -50,11 +50,9 @@ func (a *App) onPing(e PingEvent) {
|
||||
|
||||
func (a *App) addProbe(peer *Peer, v4, v6 netip.AddrPort) {
|
||||
endpoint := preferredEndpoint(v4, v6)
|
||||
if !endpoint.IsValid() || endpoint == peer.WGEndpoint() {
|
||||
if !endpoint.IsValid() || endpoint == peer.PreferredEndpoint() {
|
||||
return
|
||||
}
|
||||
|
||||
peer.Endpoint4 = v4
|
||||
peer.Endpoint6 = v6
|
||||
peer.UpdateEndpoints(v4, v6)
|
||||
a.devAddProbe(peer, endpoint)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user