feature,ipn/ipnlocal,wgengine: improve how eventbus shutdown is handled (#17156)

Instead of waiting for a designated subscription to close as a canary for the
bus being stopped, use the bus Client's own signal for closure added in #17118.

Updates #cleanup

Change-Id: I384ea39f3f1f6a030a6282356f7b5bdcdf8d7102
Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
This commit is contained in:
M. J. Fromberger
2025-09-16 10:52:39 -07:00
committed by GitHub
parent b63f5d7e7d
commit 8608e42103
5 changed files with 9 additions and 22 deletions
+1 -3
View File
@@ -157,9 +157,7 @@ func (e *extension) consumeEventbusTopics(port int) {
select {
case <-e.disconnectFromBusCh:
return
case <-reqSub.Done():
// If reqSub is done, the eventClient has been closed, which is a
// signal to return.
case <-eventClient.Done():
return
case req := <-reqSub.Events():
if rs == nil {