-
Notifications
You must be signed in to change notification settings - Fork 241
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 blocks after terminating without unsubscribing #207
Comments
this is more likely an issue on Ethermint, I assume: https://github.com/tharsis/ethermint/issues/new?assignees=&labels=&template=bug-report.md |
@yihuang and @thomas-nguy I found the cause of the issue in Ethermint per evmos/ethermint#821 (comment) and it comes from a sync.RWMutex .Lock() being invoked before a .Runlock() is invoked and Go's docs for sync.RWMutex explicitly call out this problem per https://pkg.go.dev/sync#RWMutex It'll be fixed shortly in Ethermint. |
The fixing PR got merged per evmos/ethermint#933 Can we please close this issue? |
Thanks for this! @odeke-em |
Cheers, and thank you @samuel-tay! |
Closes: crypto-org-chain#207 Solution: - backport the fix to 0.6.x
* Problem: Websocket blocks after terminating without unsubscribing Closes: #207 Solution: - backport the fix to 0.6.x * update gomod2nix.toml * Update CHANGELOG.md * tag ethermint
Describe the bug
As discussed on Discord https://discord.com/channels/783264383978569728/783264902613565450/907267013028749322
It was discovered that subscribing to WS works.
However, if a subscription is not unsubscribed and the session is terminated, then the WS blocks up and no further requests will be entertained. It doesn't help to reconnect and unsubscribe.
Also, in the instance where 2 clients are connected and if Client A terminates the session without unsubscribing, Client B blocks as well, and the whole WS blocks.
To Reproduce
Steps to reproduce the behavior:
wscat -c ws://localhost:8546
(response connected){"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}
(respond with suscription id){"id": 1, "method": "eth_unsubscribe", "params": ["(subscriptionid)"]}
Expected behavior
WS should handle disconnection without blocking.
Screenshots
NA
Desktop (please complete the following information):
Node is Linux
The text was updated successfully, but these errors were encountered: