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
Is there some way of triggering a reconnection of this library at any time?
When opening a hibernated tab in Chrome on Android, the connection has always failed at some point due to the tab hibernating. This library will try to reconnect but it will depend on the timeout how long it takes. Since I can get a focus listener using window.addEventListener('focus', handleFocusEvents); I would really like to trigger a reconnection as soon as this event fires to minimize the downtime for users.
I can do something like this, however it feels a bit hacky. Is there a better way?
constevents=newReconnectingEventSource(...);// Some time laterconsthandleFocusEvents=(e)=>{if(events&&events?._eventSource?.readyState===2){events?._start();}}
The text was updated successfully, but these errors were encountered:
Is there some way of triggering a reconnection of this library at any time?
When opening a hibernated tab in Chrome on Android, the connection has always failed at some point due to the tab hibernating. This library will try to reconnect but it will depend on the timeout how long it takes. Since I can get a focus listener using
window.addEventListener('focus', handleFocusEvents);
I would really like to trigger a reconnection as soon as this event fires to minimize the downtime for users.I can do something like this, however it feels a bit hacky. Is there a better way?
The text was updated successfully, but these errors were encountered: