Update libsignal-service

This commit is contained in:
AsamK 2025-03-31 14:45:02 +02:00
parent 3dc8844cb4
commit 69a9b30732
4 changed files with 7 additions and 4 deletions

View file

@ -10,7 +10,7 @@ slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
slf4j-jul = { module = "org.slf4j:jul-to-slf4j", version.ref = "slf4j" }
logback = "ch.qos.logback:logback-classic:1.5.18"
signalservice = "com.github.turasa:signal-service-java:2.15.3_unofficial_119"
signalservice = "com.github.turasa:signal-service-java:2.15.3_unofficial_120"
sqlite = "org.xerial:sqlite-jdbc:3.49.1.0"
hikari = "com.zaxxer:HikariCP:6.3.0"
junit-jupiter = "org.junit.jupiter:junit-jupiter:5.12.0"

View file

@ -100,6 +100,7 @@ public class ReceiveHelper {
.distinctUntilChanged()
.subscribe(this::onWebSocketStateChange);
signalWebSocket.connect();
signalWebSocket.registerKeepAliveToken("receive");
try {
receiveMessagesInternal(signalWebSocket, timeout, returnOnTimeout, maxMessages, handler, queuedActions);
@ -107,6 +108,7 @@ public class ReceiveHelper {
hasCaughtUpWithOldMessages = false;
handleQueuedActions(queuedActions.keySet());
queuedActions.clear();
signalWebSocket.removeKeepAliveToken("receive");
signalWebSocket.disconnect();
webSocketStateDisposable.dispose();
shouldStop = false;

View file

@ -41,6 +41,7 @@ import java.net.Proxy;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
public class SignalDependencies {
@ -257,7 +258,7 @@ public class SignalDependencies {
Optional.of(credentialsProvider),
userAgent,
healthMonitor,
allowStories));
allowStories), timer, TimeUnit.SECONDS.toMillis(10));
healthMonitor.monitor(authenticatedSignalWebSocket);
});
}
@ -273,7 +274,7 @@ public class SignalDependencies {
Optional.empty(),
userAgent,
healthMonitor,
allowStories));
allowStories), timer, TimeUnit.SECONDS.toMillis(10));
healthMonitor.monitor(unauthenticatedSignalWebSocket);
});
}

View file

@ -90,7 +90,7 @@ final class SignalWebSocketHealthMonitor implements HealthMonitor {
}
private boolean sendKeepAlives() {
return needsKeepAlive && webSocket != null && webSocket.getShouldSendKeepAlives();
return needsKeepAlive && webSocket != null && webSocket.shouldSendKeepAlives();
}
/**