How would I go about reconnecting in case of websocket disconnect?
On disconnect event is only logged, but HubConnection inherits from websocket.WebSocketApp you can search a solution for you problem in this library. Now i have free time to work in library again, so asap i try to fix this issue. Here is an issue related github.com/websocket-client/websoc...
I have looked at the link. The only thing I see is to add run_forever, but you already have that in base_hub_connection.
run_forever seems to work when network cable is disconnected but it only tries to reconnect for approx 1 minute, and it also gives a websocket error after 1 min.
This weekend i was working on it, during this week. I will update library with "ondisconnected" method to configure reconnection. I tried to do that simplest way. I will explain the implementation on a post, to see if someone gives me feedback and improve that feature.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.