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
Hi thanks for the great work.
I encountered an issue with grpc-web when we used websocket as the transport layer.
The problem is if user is on mobile device and put the app to background for 10 minutes more or so.
When user active the tab again, the websocket already dead and since it's killed while Javascript is asleep.
I believe the 'onTransportEnd' method don't run.
I have a callback to reconnect websocket in when end is triggered. in this case the callback didn't run.
Is there anyway to get the status of websocket from the current implementation of grpc-web?
The problem is quite common and easy to solve by exposing websockets, or just a method to get the status of websockets.
For example:
document.addEventListener("visibilitychange", () => {
if(document.visibility === 'visible') {
// get the status of each websocket connection and reconnect if it dies
}
})
The text was updated successfully, but these errors were encountered:
I think it's different .
when PC enter a sleep mode, the websocket is killed before javascript is asleep.
For mobile device when user put app to background, the javascript is a sleep but websocket is still connected for some time and then it will be killed after few minutes while javascript is asleep.
Hi thanks for the great work.
I encountered an issue with grpc-web when we used websocket as the transport layer.
The problem is if user is on mobile device and put the app to background for 10 minutes more or so.
When user active the tab again, the websocket already dead and since it's killed while Javascript is asleep.
I believe the 'onTransportEnd' method don't run.
I have a callback to reconnect websocket in when
end
is triggered. in this case the callback didn't run.Is there anyway to get the status of websocket from the current implementation of grpc-web?
The problem is quite common and easy to solve by exposing websockets, or just a method to get the status of websockets.
For example:
The text was updated successfully, but these errors were encountered: