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

peer Registration Race when client connects to the signal server #35

Closed
braginini opened this issue Jun 17, 2021 · 0 comments · Fixed by #28
Closed

peer Registration Race when client connects to the signal server #35

braginini opened this issue Jun 17, 2021 · 0 comments · Fixed by #28
Assignees
Labels
bug Something isn't working

Comments

@braginini
Copy link
Contributor

What?
Due to the async nature of gRPC bi-directional streams, the client gets successfully connected to the stream before the Signal server registers it in the registry. Therefore signal/client.WaitConnected() returns before the peer was registered.
This is visible in the test environments when signal and peers are "close", not likely to happen in the production scenario.

Why?
A peer has to start communication with other peers only when it has been registered therefore signal/client.WaitConnected() should unblock when the peer has been actually registered on signal

How?
We could introduce additional methods to register peer on signal or use meta headers of gRPC on ConnectStream

@braginini braginini added the bug Something isn't working label Jun 17, 2021
@braginini braginini self-assigned this Jun 17, 2021
@braginini braginini linked a pull request Jun 17, 2021 that will close this issue
pulsastrix pushed a commit to pulsastrix/netbird that referenced this issue Dec 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant