🐛 Auto reconnect
This commit is contained in:
parent
e96b49e3cd
commit
99a51de9f6
@ -84,9 +84,11 @@ class AccountProvider extends GetxController {
|
||||
},
|
||||
onDone: () {
|
||||
isConnected.value = false;
|
||||
Future.delayed(const Duration(milliseconds: 1000), () => connect());
|
||||
},
|
||||
onError: (err) {
|
||||
isConnected.value = false;
|
||||
Future.delayed(const Duration(milliseconds: 1000), () => connect());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -58,9 +58,11 @@ class ChatProvider extends GetxController {
|
||||
},
|
||||
onDone: () {
|
||||
isConnected.value = false;
|
||||
Future.delayed(const Duration(milliseconds: 1000), () => connect());
|
||||
},
|
||||
onError: (err) {
|
||||
isConnected.value = false;
|
||||
Future.delayed(const Duration(milliseconds: 1000), () => connect());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user