Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions mobile/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,15 @@ export default function HomeScreen() {
fetchTaskProviders(entry.client, entry.hostId, setTaskProvidersByHost, () => false)
}
} else {
if (unsubNotif) {
unsubNotif()
unsubNotif = null
}
// Why (#8129): keep the notification subscription alive across the
// reconnect cycle. subscribeToDesktopNotifications relies on the RPC
// client replaying its stream and re-emitting `ready` on reconnect to
// trigger catch-up (fetchMissed, gated on reconnectReadyCount > 1).
// Tearing it down on every non-'connected' state destroyed and
// recreated the subscription each reconnect, resetting the internal
// reconnectReadyCount to 0 so catch-up never fired. The subscription
// is still disposed by the effect cleanup below when the
// (hostId, client) pair changes.
if (unsubAccounts) {
unsubAccounts()
unsubAccounts = null
Expand Down
Loading