Files
Alexandr Stelnykovych 458e708f13 fix(netenv): do not block callers on the interface address refresh
IsMyIP and GetLocalNetwork held myNetworksLock while refreshMyNetworks
called the OS, and that call sometimes takes seconds. Every waiting
caller then made its own slow call once it got the lock, so the queue
of goroutines only grew and DNS stayed blocked.

The networks are now an atomic snapshot, read without a lock, and the
refresh runs through singleflight: callers that arrive during a refresh
share its result. The throttle counts from the end of the call, so slow
calls do not run back to back, and the changed flag is reset before the
call, so a change during it is not lost. Callers that arrive during a
refresh after a network change wait for the new networks.
2026-10-27 14:30:49 +02:00
..
2024-08-09 18:15:48 +03:00
2024-08-09 18:15:48 +03:00
2024-08-09 18:15:48 +03:00
2025-08-07 02:04:38 +03:00
2024-08-09 18:15:48 +03:00
2024-10-31 16:38:12 +01:00
2024-08-09 18:15:48 +03:00