mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-26 06:49:22 +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());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
WebSocketHelper.close();
|
||||
}
|
||||
|
||||
/// Try to connect to server
|
||||
void _tryConnect() async {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user