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:
- Have a local node running
- On CLI
wscat -c ws://localhost:8546 (response connected)
{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]} (respond with suscription id)
- Ctrl+C to force exit
- Repeat 2-3, no response in step 3
- Restart node
- Repeat steps 2-3
{"id": 1, "method": "eth_unsubscribe", "params": ["(subscriptionid)"]}
- Ctrl+C to exit.
- Repeat steps 2-3, subscription works
Expected behavior
WS should handle disconnection without blocking.
Screenshots
NA
Desktop (please complete the following information):
Node is Linux
Original issue
crypto-org-chain/cronos#207