You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when there aren't many events on subscribed address the websocket seems to close the session probably due to default os/firewall/network setting tcp keep alive: 7200 - 2 hours
For example, I use this function to monitor/subscribe my block rewards when my validator has been elected in current epoch, I can see events coming in but when it's not elected and you have to wait 12 hours to be elected again, the websocket timed out already, have to manually restart the process.
Let me know if this solution works for you, specially if you find any issues with the types. Thank you!
PS: I am planning to refactor the WebClient implementation to use a WebSocket library to take advantage of features like auto-reconnect, timeout... You can follow #64 to find out when this will be available :)
Let me know if this solution works for you, specially if you find any issues with the types. Thank you!
PS: I am planning to refactor the WebClient implementation to use a WebSocket library to take advantage of features like auto-reconnect, timeout... You can follow #64 to find out when this will be available :)
when there aren't many events on subscribed address the websocket seems to close the session probably due to default os/firewall/network setting tcp keep alive: 7200 - 2 hours
For example, I use this function to monitor/subscribe my block rewards when my validator has been elected in current epoch, I can see events coming in but when it's not elected and you have to wait 12 hours to be elected again, the websocket timed out already, have to manually restart the process.
proposed way to mitigate that:
expose
ws.onclose
to client, so we can pass callback function to reset the subscribe functionThe text was updated successfully, but these errors were encountered: