From 465e977ce1d2d1fbb594299c60004043bac4fd70 Mon Sep 17 00:00:00 2001 From: riccardom Date: Fri, 7 Aug 2026 10:02:24 +0200 Subject: [PATCH] Without the comment --- client/internal/peer/conn.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/client/internal/peer/conn.go b/client/internal/peer/conn.go index 62ef8d4f0..fe68bb15d 100644 --- a/client/internal/peer/conn.go +++ b/client/internal/peer/conn.go @@ -307,12 +307,6 @@ func (conn *Conn) Close(signalToRemote bool) { if conn.wgWatcherCancel != nil { conn.wgWatcherCancel() - // The Conn struct is reused across lazy deactivate/activate. ctxCancel above - // already stopped the watcher goroutine (its ctx derives from conn.ctx), but - // enableWgWatcherIfNeeded skips while conn.wgWatcher is non-nil — so a stale - // pointer here would leave the peer with no watcher after the next Open, and thus - // no WireGuard handshake-timeout detection once a lazy connection has idled and - // woken. Clear it so the next Open starts a fresh watcher. conn.wgWatcher = nil conn.wgWatcherCancel = nil }