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