mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-02 10:01:57 +00:00
control/controlknobs,wgengine/magicsock: implement SilentDisco toggle (#10195)
This change exposes SilentDisco as a control knob, and plumbs it down to magicsock.endpoint. No changes are being made to magicsock.endpoint disco behavior, yet. Updates #540 Signed-off-by: Jordan Whited <jordan@tailscale.com> Co-authored-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
@@ -440,6 +440,13 @@ func (de *endpoint) heartbeat() {
|
||||
de.heartBeatTimer = time.AfterFunc(heartbeatInterval, de.heartbeat)
|
||||
}
|
||||
|
||||
// setHeartbeatDisabled sets heartbeatDisabled to the provided value.
|
||||
func (de *endpoint) setHeartbeatDisabled(v bool) {
|
||||
de.mu.Lock()
|
||||
defer de.mu.Unlock()
|
||||
de.heartbeatDisabled = v
|
||||
}
|
||||
|
||||
// wantFullPingLocked reports whether we should ping to all our peers looking for
|
||||
// a better path.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user