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

Websockets that are not open can lead to stalling #9

Open
TylerEther opened this issue May 27, 2024 · 0 comments · May be fixed by #10
Open

Websockets that are not open can lead to stalling #9

TylerEther opened this issue May 27, 2024 · 0 comments · May be fixed by #10

Comments

@TylerEther
Copy link

Using a WebsocketProvider whose websocket is not open can lead to avoidable stalling.

An efficient usage of FallbackProvider may look like having a websocket provider as the first provider, followed by JSON-RPC providers as backups. Such setup can avoid HTTP/S overhead. But if the websocket provider closes or takes a while to connect, FallbackProvider will wait for the timeout before moving to the fallbacks.

We can read the websocket's readyState to avoid this issue and quickly fallback.

@TylerEther TylerEther linked a pull request May 27, 2024 that will close this issue
4 tasks
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

Successfully merging a pull request may close this issue.

1 participant