-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
websocket transport could be killed while javascript is asleep. #1312
Comments
I faced the same problem. In addition to the
In my case, when PC enters sleep mode, a status change is triggered with I found the status table here. Hope this helps you :) |
I think it's different . |
Maybe this also relates to #1363, where no end-event is sent if the network changes. Though I'm not sure, as it doesn't use websockets. |
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: