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

Automatic reconnection docs misleading #969

Open
jeanbmar opened this issue Feb 17, 2024 · 1 comment
Open

Automatic reconnection docs misleading #969

jeanbmar opened this issue Feb 17, 2024 · 1 comment

Comments

@jeanbmar
Copy link

jeanbmar commented Feb 17, 2024

README says:

Most real-world WebSockets situations involve longer-lived connections. The WebSocketApp run_forever loop will automatically try to reconnect to an open WebSocket connection when a network connection is lost if it is provided with:

- a dispatcher argument (async dispatcher like rel or pyevent)
- a non-zero reconnect argument (delay between disconnection and attempted reconnection)

Providing a non-zero reconnect argument is actually sufficient.

This library already includes a dispatcher that handles reconnection.

It's unclear why rel dispatcher is beneficial vs the standard one, and it should be detailed if there's a real reason. Also, working on sensitive topics, I find always a bit odd when a 3k+ stars GitHub repo advise using a 20 stars 3rd-party repo.

@bubbleboy14
Copy link
Collaborator

@jeanbmar a custom dispatcher (such as rel) would generally be used in the context of async applications. The most obvious use case is running multiple WebSocketApp instances without mucking around with threads.

However, I agree that it would be clearer for the reconnect section of the docs to focus on the reconnect kwarg.

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

2 participants