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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user