mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 04:49:21 +00:00
Fix reconnection
This commit is contained in:
parent
d9662ed189
commit
2857440d0c
@ -150,9 +150,11 @@ public class NotificationsService extends Service implements Runnable {
|
||||
}
|
||||
|
||||
|
||||
Log.v(TAG, "Wait a little before reconnecting...");
|
||||
|
||||
// Wait attempting new connection
|
||||
// noinspection BusyWait
|
||||
Thread.sleep(RECONNECT_INTERVAL * 1000);
|
||||
Thread.sleep(RECONNECT_INTERVAL);
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
@ -176,9 +178,11 @@ public class NotificationsService extends Service implements Runnable {
|
||||
|
||||
@Override
|
||||
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!");
|
||||
synchronized (lock) {
|
||||
lock.notify();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextFrame(WebSocket websocket, WebSocketFrame frame) throws Exception {
|
||||
|
Loading…
Reference in New Issue
Block a user