mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Reconnect websockets after errors
This commit is contained in:
parent
07742843df
commit
bfddb40d73
1 changed files with 2 additions and 0 deletions
|
@ -101,6 +101,7 @@ public final class SignalWebSocketHealthMonitor implements HealthMonitor {
|
||||||
if (healthState.mismatchErrorTracker.addSample(System.currentTimeMillis())) {
|
if (healthState.mismatchErrorTracker.addSample(System.currentTimeMillis())) {
|
||||||
logger.warn("Received too many mismatch device errors, forcing new websockets.");
|
logger.warn("Received too many mismatch device errors, forcing new websockets.");
|
||||||
signalWebSocket.forceNewWebSockets();
|
signalWebSocket.forceNewWebSockets();
|
||||||
|
signalWebSocket.connect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,6 +147,7 @@ public final class SignalWebSocketHealthMonitor implements HealthMonitor {
|
||||||
+ " needed by: "
|
+ " needed by: "
|
||||||
+ keepAliveRequiredSinceTime);
|
+ keepAliveRequiredSinceTime);
|
||||||
signalWebSocket.forceNewWebSockets();
|
signalWebSocket.forceNewWebSockets();
|
||||||
|
signalWebSocket.connect();
|
||||||
} else {
|
} else {
|
||||||
signalWebSocket.sendKeepAlive();
|
signalWebSocket.sendKeepAlive();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue