Revert "Depend on libsignal-net's connection backoff instead of duplicating at app-level."

This reverts commit 1aed82d5b7.
This commit is contained in:
Cody Henthorne
2025-04-23 16:13:42 -04:00
parent 68f567b0b7
commit 91140c41fd

View File

@@ -368,13 +368,9 @@ class IncomingMessageObserver(private val context: Application, private val auth
while (!terminated) {
Log.i(TAG, "Waiting for websocket state change....")
if (attempts > 1) {
if (RemoteConfig.libSignalWebSocketEnabled) {
Log.i(TAG, "Skipping app-level exponential back-off; depending on built-in back-off in LibSignalChatConnection.")
} else {
val backoff = BackoffUtil.exponentialBackoff(attempts, TimeUnit.SECONDS.toMillis(30))
Log.w(TAG, "Too many failed connection attempts, attempts: $attempts backing off: $backoff")
sleepTimer.sleep(backoff)
}
val backoff = BackoffUtil.exponentialBackoff(attempts, TimeUnit.SECONDS.toMillis(30))
Log.w(TAG, "Too many failed connection attempts, attempts: $attempts backing off: $backoff")
sleepTimer.sleep(backoff)
}
waitForConnectionNecessary()