Closed osmanov closed 7 years ago
I have same problem.
Same problem. I created a handler for the AppState change so when the app state = "background" I stop the connection.. something like this:
_handleAppStateChange = (nextAppState) => {
if(nextAppState === 'background') {
this.connectionSignalR.stop();
}
}
and I restarted the connection in the "disconnected" signalr event...
for my needs, it worked, hope it can help you
Thanks @brunobraun, it helped me.
In my case, stopping it in the background gave me a problem, when I restarted signalr it was stays stuck in connecting state, and only connected when i came back to the app. So i stopped and restarted signalr on 'active' AppState
@brunobraun sample code please, I mean more than that _handleAppStateChange change function.Will be great help Thanks
Awesome module,thank you very much for your work! I have a question-what is the best way for catching server errors without red screen of death?
Thank you!