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
When app is in the foreground and alive, any changes in internet connection correctly and properly fire OnDone events appropriately allowing for a swift reconnection if the network has changed.
The issue we observe is as follows
Bring app to foreground with WIFI and 5G on
Put app to background and wait for Android to put in Doze
Disconnect WIFI whilst app is asleep
Bring app back up again
We notice that no onDone or onError messages are fired (presumably because the socket was cleared whilst app is asleep). This is a little troublesome but I can understand it...
If we use another mechanism to clean up the stuck socket (as we missed events) , we clean up the socket and reconnect a new one. Although reconnection is successful , from then on web_socket_dart no longer reports OnDone or OnError events . This is even if the app was in the foreground and running from then on.
I think perhaps maybe the fact that the library missed events during the sleep period has resulted in callback handlers being corrupted.
Anyone else have this issue ?
The text was updated successfully, but these errors were encountered:
@panmin . Unfortunately as issue was not resolved we had to implement an app layer socket check/keep alive. Flutter events were to consistently being not fired. This solution is inefficient but needed for time being
I am facing a similar issue. It also happens when the websocket is opened and the network is switched, or in the case of flutter desktop when a computer running a flutter app wakes up from sleep.
This is mission critical for my org so if any developer/maintainer of this project can point me in the right direction, I will be happy to attempt to fix this myself
We are noticing this unusual behaviour that may need some feedback. We setup a channel as below
`
var channel = IOWebSocketChannel.connect(Uri.parse(url), connectTimeout: const Duration(seconds: 3));
_subscription = channel.stream.listen(onMessage, onDone: onClosed, onError: onError);
`
When app is in the foreground and alive, any changes in internet connection correctly and properly fire OnDone events appropriately allowing for a swift reconnection if the network has changed.
The issue we observe is as follows
We notice that no onDone or onError messages are fired (presumably because the socket was cleared whilst app is asleep). This is a little troublesome but I can understand it...
If we use another mechanism to clean up the stuck socket (as we missed events) , we clean up the socket and reconnect a new one. Although reconnection is successful , from then on web_socket_dart no longer reports OnDone or OnError events . This is even if the app was in the foreground and running from then on.
I think perhaps maybe the fact that the library missed events during the sleep period has resulted in callback handlers being corrupted.
Anyone else have this issue ?
The text was updated successfully, but these errors were encountered: