Tweak when decryption drained state is reset.

This commit is contained in:
Greyson Parrelli 2024-08-05 10:54:53 -04:00 committed by mtang-signal
parent b46b04fcdf
commit 981e7a4270

View file

@ -376,8 +376,10 @@ class IncomingMessageObserver(private val context: Application) {
val webSocketDisposable = AppDependencies.webSocketObserver.subscribe { state: WebSocketConnectionState ->
Log.d(TAG, "WebSocket State: $state")
// Any state change at all means that we are not drained
decryptionDrained = false
// Any change to a non-connected state means that we are not drained
if (state != WebSocketConnectionState.CONNECTED) {
decryptionDrained = false
}
if (state == WebSocketConnectionState.CONNECTED) {
SignalStore.misc.lastWebSocketConnectTime = System.currentTimeMillis()