bitsharesjs-ws
bitsharesjs-ws copied to clipboard
Terminating a ws connection takes forever, why?
I am testing new reconnection strategy for UI and I found that it takes forever when ChainWebSocket recognizes that connection is dead until the rpc_connection_status in BlockchainStore is updated.
Why is that @svk31 ? You can test it by simply opening the UI and disabling the internet connection after connection has been established. Are there any timeouts involved that are possibly to high?
How did you get on with this issue?
No fix so far
I've been working on improving the TransactionBuilder + Apis code here: https://github.com/BTS-CM/astro-nft-tool/tree/main/src/blockchain/ws
I'm now able to immediately close an WSS connection after querying the server, though I had to remove a lot of functionality surrounding keepalive timers.
Hopefully I'll also have success in migrating it all fully from JS to TS, at the moment only the WS folder is TS.