mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-21 09:11:18 -08:00
ipn/ipnlocal: remove web client listeners after close
This prevents a panic in some cases where WebClientShutdown is called multiple times. Updates tailscale/corp#14335 Signed-off-by: Will Norris <[email protected]>
This commit is contained in:
1 parent
7c99a1763b
commit
79719f05a9
1 file changed
+2
-1
@@ -79,8 +79,9 @@ func (b *LocalBackend) WebClientShutdown() {
|
||||
b.mu.Lock()
|
||||
server := b.webClient.server
|
||||
b.webClient.server = nil
|
||||
for _, ln := range b.webClientListeners {
|
||||
for ap, ln := range b.webClientListeners {
|
||||
ln.Close()
|
||||
delete(b.webClientListeners, ap)
|
||||
}
|
||||
b.mu.Unlock() // release lock before shutdown
|
||||
if server != nil {
|
||||
|
||||
Reference in new issue
Block a user