mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 12:14:11 +00:00 
			
		
		
		
	Close WebSocket when InitWidget state is disposed
This commit is contained in:
		@@ -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 {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user