ipn,net,tsnet,wgengine: make an eventbus mandatory where it is used (#16594)

In the components where an event bus is already plumbed through, remove the
exceptions that allow it to be omitted, and update all the tests that relied on
those workarounds execute properly.

This change applies only to the places where we're already using the bus; it
does not enforce the existence of a bus in other components (yet),

Updates #15160

Change-Id: Iebb92243caba82b5eb420c49fc3e089a77454f65
Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
This commit is contained in:
M. J. Fromberger
2025-07-29 09:04:08 -07:00
committed by GitHub
parent e5e4386f33
commit b34cdc9710
11 changed files with 133 additions and 123 deletions

View File

@@ -435,10 +435,7 @@ func (s *Server) Close() error {
ln.closeLocked()
}
wg.Wait()
if bus := s.sys.Bus.Get(); bus != nil {
bus.Close()
}
s.sys.Bus.Get().Close()
s.closed = true
return nil
}