bitshares / bitsharesjs-ws

Javascript websocket interface for BitShares
MIT License
30 stars 117 forks source link

Terminating a ws connection takes forever, why? #21

Open sschiessl-bcp opened 6 years ago

sschiessl-bcp commented 6 years ago

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?

image

grctest commented 2 years ago

How did you get on with this issue?

sschiessl-bcp commented 1 year ago

No fix so far

grctest commented 2 months ago

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.