-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Websocket Provider "error" and "end" events not fired when client disconnects #3485
Comments
Re-opening for visibility. (Not sure how widely used the provider.on('error') pattern is and |
I got the same error on 1.2.7 |
Fixed in 1.2.8 |
this doesn't work again in 1.3.4 - 'end', 'error' and even 'close' never fire - only 'connect' does. Also, where is the documentation?? Available events description is absent altogether. It needs to be drastically improved. Including the available provider options. Right now there is just a usage example without any explanation of what e.g. "auto" or "keepalive" do and how they are (expected) to work exactly. |
issue persist in "web3": "^1.8.1" |
As reported by @hfa0 in #3190 comment, 1.2.7 introduces a bug where "error" and "end" listeners directly attached to the Websocket provider aren't firing as expected on close.
Subscriptions and events do have their error handlers fired, and pending requests should also error correctly.
The "close" event contains an object lots of information about what happened fwiw:
Web3.js versions: 1.2.7, 1.2.7-rc.0
The text was updated successfully, but these errors were encountered: