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

Missing Handshake Notifications in channel #180

Open
SX91 opened this issue Jul 6, 2023 · 3 comments
Open

Missing Handshake Notifications in channel #180

SX91 opened this issue Jul 6, 2023 · 3 comments

Comments

@SX91
Copy link

SX91 commented Jul 6, 2023

Hello!
I've used the approach similar to the proposed one here, but sometimes the connected peer is not being registered.
Seems like it happens because the StateMachine.hsNotifyc is created as unbuffered channel, and writes to this channel are non-blocking (select + default), thus "skipping" some notifications if the receiver is "slow".

Any suggestions how to make notifications reliable?

@AndrewK1273
Copy link

I have the same experience. When two clients connect at the same time, the handshake notification from one of them is missing

@fiorix
Copy link
Owner

fiorix commented Nov 10, 2024

Happy to try and review a patch to resolve this

@AndrewK1273
Copy link

Would it be a problem to make the hsNotifyc channel buffered? If there were no consumers, a few messages would remain in the channel, but that wouldn’t matter, would it?

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

No branches or pull requests

3 participants