ipn/ipnlocal: fix race condition that results in a panic sending on a closed channel
Fixes #13288 Signed-off-by: Nick Khyl <nickk@tailscale.com>
This commit is contained in:
@@ -331,7 +331,7 @@ func (b *LocalBackend) setServeConfigLocked(config *ipn.ServeConfig, etag string
|
||||
if !has(k) {
|
||||
for _, sess := range b.notifyWatchers {
|
||||
if sess.sessionID == k {
|
||||
close(sess.ch)
|
||||
sess.cancel()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user