Skip to content

Commit

Permalink
fixup! Wipe all endpoints on BlockEndpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
deansheather committed Jun 21, 2024
1 parent 5beb71a commit 6f25043
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion wgengine/magicsock/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,14 @@ func (de *endpoint) clearEndpoints(why string) {
What: "clearEndpoints-" + why,
})
de.endpointState = map[netip.AddrPort]*endpointState{}
de.bestAddr = addrLatency{}
if de.bestAddr.AddrPort.IsValid() {
de.debugUpdates.Add(EndpointChange{
When: time.Now(),
What: "clearEndpoints-bestAddr-" + why,
From: de.bestAddr,
})
de.bestAddr = addrLatency{}
}
de.c.logf("magicsock: disco: node %s %s now using DERP only (all endpoints deleted)",
de.publicKey.ShortString(), de.discoShort())
}
Expand Down

0 comments on commit 6f25043

Please sign in to comment.