mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-11-29 08:55:48 +00:00
Only update last received timestamp at most once per minute
This commit is contained in:
1 parent
8aab644db9
commit
89f568dd1f
2 files changed
+13
-1
No files matched your search
@@ -1045,7 +1045,10 @@ public class ManagerImpl implements Manager {
|
||||
while (!Thread.interrupted()) {
|
||||
SignalServiceEnvelope envelope;
|
||||
final CachedMessage[] cachedMessage = {null};
|
||||
account.setLastReceiveTimestamp(System.currentTimeMillis());
|
||||
final var nowMillis = System.currentTimeMillis();
|
||||
if (nowMillis - account.getLastReceiveTimestamp() > 60000) {
|
||||
account.setLastReceiveTimestamp(nowMillis);
|
||||
}
|
||||
logger.debug("Checking for new message from server");
|
||||
try {
|
||||
var result = signalWebSocket.readOrEmpty(unit.toMillis(timeout), envelope1 -> {
|
||||
|
||||
Reference in new issue
Block a user