Files
tailscale/net
Nick Khyl f6fbcf8411 net/netmon: don't hold mu while closing the OS monitor
On Windows, winMon.Close unregisters the route/address/interface change
callbacks and waits for in-flight ones to return. Those callbacks call
Monitor.isActive, which takes m.mu. Monitor.Close held m.mu across
om.Close, so a change notification arriving during Close deadlocked
with it, and the test binary hung until the timeout.

Release m.mu before calling om.Close. m.closed is already set under the
lock, so late callbacks see the monitor as inactive and return.

Fixes #22228

Signed-off-by: Nick Khyl <[email protected]>
2026-11-06 18:19:39 -08:00
..
2026-07-10 17:39:16 -07:00