Hi, I write an async WebSocket client myself. But I want to know what's the best practice to implement an async WebSocket client. I'm new to async.
The main logic is here, https://github.com/l2ust/substrater/blob/main/src/websocket.rs#L58-#L110.
Also, I have this function https://github.com/l2ust/substrater/blob/main/src/websocket.rs#L311 to get the RPC result, but once the connection lost it'll cause a deadlock. How can I check the WebSocket connection state with this crate https://github.com/sdroege/async-tungstenite?
Thanks for taking the time to read my code!