-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
No reconnect method in WsProvider. #405
Comments
You can pretty much catch the exception and call the connect method again. But I guess what you want is to auto-reconnect, is that correct? |
auto reconnect would be a nice feature. But my main problem with no 'onError' and 'onDone' callbacks. After losing internet connection Websocket connection will be lost as well as all subscriptions and queries. And there's no TimeOutException in websocket by default. For example: }).listen((message) {
queries.remove(message.id)!.complete(message);
}); And [line 203 - 207] }).listen((message) {
final StreamController? controller =
get SubscriptionController(message.subscription);
controller?.add(message);
}); 'jsonStream' only listening for responses and completely ignores any errors. |
I see. @Lohann was responsible for this part but not sure if he has free time to look into it. I'm going to check with him and if he is not able to take a look add to my queue here. |
Good catch @overetch, will fix this week when I have some free time. |
@Lohann were you able to look into this? |
Hello,
How to implement reconnect function with built-in Ws Provider?
As a workaround I created custom Ws Provider that extends Provider, and implement it by myself.
The text was updated successfully, but these errors were encountered: