mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 04:04:18 +00:00 
			
		
		
		
	Fix reconnection
This commit is contained in:
		@@ -150,9 +150,11 @@ public class NotificationsService extends Service implements Runnable {
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                Log.v(TAG, "Wait a little before reconnecting...");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                // Wait attempting new connection
 | 
					                // Wait attempting new connection
 | 
				
			||||||
                // noinspection BusyWait
 | 
					                // noinspection BusyWait
 | 
				
			||||||
                Thread.sleep(RECONNECT_INTERVAL * 1000);
 | 
					                Thread.sleep(RECONNECT_INTERVAL);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        } catch (InterruptedException e) {
 | 
					        } catch (InterruptedException e) {
 | 
				
			||||||
            e.printStackTrace();
 | 
					            e.printStackTrace();
 | 
				
			||||||
@@ -176,8 +178,10 @@ public class NotificationsService extends Service implements Runnable {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            @Override
 | 
					            @Override
 | 
				
			||||||
            public void onDisconnected(WebSocket websocket, WebSocketFrame serverCloseFrame, WebSocketFrame clientCloseFrame, boolean closedByServer) throws Exception {
 | 
					            public void onDisconnected(WebSocket websocket, WebSocketFrame serverCloseFrame, WebSocketFrame clientCloseFrame, boolean closedByServer) throws Exception {
 | 
				
			||||||
                Log.v(TAG, "Disconnect from independent push notifications websocket!");
 | 
					                Log.v(TAG, "Disconnected from independent push notifications websocket!");
 | 
				
			||||||
                lock.notify();
 | 
					                synchronized (lock) {
 | 
				
			||||||
 | 
					                    lock.notify();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            @Override
 | 
					            @Override
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user