Fix bug where background connection would drop in forceWebsocket mode.

Relates to #14793
This commit is contained in:
Greyson Parrelli
2026-06-10 15:20:00 -04:00
committed by Cody Henthorne
parent 8950f7f7f9
commit 41260f37c9
@@ -258,7 +258,7 @@ class IncomingMessageObserver(
val lastInteractionString = if (appVisibleSnapshot) "N/A" else timeIdle.toString() + " ms (" + (if (timeIdle < maxBackgroundTime) "within limit" else "over limit") + ")"
val conclusion = registered &&
!unauthorizedReceived &&
(appVisibleSnapshot || timeIdle < maxBackgroundTime || !fcmEnabled) &&
(appVisibleSnapshot || timeIdle < maxBackgroundTime || !fcmEnabled || forceWebsocket) &&
hasNetwork
val needsConnectionString = if (conclusion) "Needs Connection" else "Does Not Need Connection"