mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 12:59:21 +00:00
Close WebSocket when InitWidget state is disposed
This commit is contained in:
parent
40cf1b1ddc
commit
159e7228bf
@ -32,6 +32,12 @@ class _InitializeWidgetState extends SafeState<InitializeWidget> {
|
|||||||
super.listen<WSClosedEvent>((e) => _tryConnect());
|
super.listen<WSClosedEvent>((e) => _tryConnect());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
WebSocketHelper.close();
|
||||||
|
}
|
||||||
|
|
||||||
/// Try to connect to server
|
/// Try to connect to server
|
||||||
void _tryConnect() async {
|
void _tryConnect() async {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user