mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Only update last received timestamp at most once per minute
This commit is contained in:
parent
8aab644db9
commit
89f568dd1f
2 changed files with 13 additions and 1 deletions
|
@ -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 -> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue