Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client/server/server.go->Status() returns connected when WiFi Dropouts #1932

Closed
hurricanehrndz opened this issue May 6, 2024 · 5 comments
Closed

Comments

@hurricanehrndz
Copy link
Contributor

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

  1. Connect
  2. Turn off WiFi
  3. 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

@mlsmaycon
Copy link
Collaborator

@hurricanehrndz, the connected status has the following behavior:

  1. 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
  2. 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, #1904, which will respond to network changes, especially the ones that touch the default gateway.

@hurricanehrndz
Copy link
Contributor Author

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

@hurricanehrndz
Copy link
Contributor Author

I will attempt to test with the network monitor and report my findings

@hurricanehrndz
Copy link
Contributor Author

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.

@hurricanehrndz
Copy link
Contributor Author

Never mind, network monitor does help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants