netbird
netbird copied to clipboard
client/server/server.go->Status() returns connected when WiFi Dropouts
Describe the problem
client/server/server.go->Status() returns a status connected when WiFi is suddenly disconnected this contradicts the output of netbird status that accurately reflects the connection state
This results in the menubar/systray item inaccurately reflecting the connection state, is this oversight or an actual design decission?
To Reproduce
Steps to reproduce the behavior: On macOS
- Connect
- Turn off WiFi
- Icon indicates I am successfully connected when it is impossible
Expected behavior
Icon should accurately reflect the connection state
Are you using NetBird Cloud? Nope
NetBird version 0.27.3
NetBird status -d output:
NA
@hurricanehrndz, the connected status has the following behavior:
- connection to the management and signal servers: they are handled by the grpc client and have a 10s timeout; this may cause an invalid status during this timeout
- P2P connections are not considered in the status response; they are additional to the management/signal status
If the status is not updating after a few seconds, that's an issue.
We are working on a network monitor, https://github.com/netbirdio/netbird/pull/1904, which will respond to network changes, especially the ones that touch the default gateway.
Thanks for the info, internal state is in server is never updated when connection to Signal or Management endpoint is terminated. Not sure if it should though
I will attempt to test with the network monitor and report my findings
Network monitor will not work in our testing. It does too much and creates more issues than it helps solves. I maybe able to work around it, if I can change https://github.com/netbirdio/netbird/blob/main/client/server/server.go#L615 to optionally run probes.
Never mind, network monitor does help