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

Close connection event channel on disconnect #181

Open
ondrej-fabry opened this issue Jan 9, 2024 · 0 comments
Open

Close connection event channel on disconnect #181

ondrej-fabry opened this issue Jan 9, 2024 · 0 comments
Labels

Comments

@ondrej-fabry
Copy link
Member

Intro

This issue tracks progress for fixing issue with connection even channel on disconnect.

Problem

With the current implementation the core.AsyncConnect will return channel for core.ConnectionEvent which allows user to receive events about the connection state. However there might be cases where the reconnection loop with terminate and no more reconnect attempts will be done. If the user for some reason misses the event (full buffer) or accidentally calls Disconnect somewhere in the code he might run into situation where the receiving of next event will block forever.

Solution

This problem can be solved by closing the connection event channel after termination of reconnect loop.

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

No branches or pull requests

1 participant