Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(client-runtime): iOS resume keeps live sockets and drops dead ones 4x faster #25824

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/25824/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 23 changed files with 6 additions and 5 deletions (loading 20).

x
0 of 23 viewed, 23 left
4 additions and 4 deletionsapps/mobile/src/connection/app-state-wakeups.tsModified
View file
@@ -1,10 +1,10 @@
import type { Wakeups } from "@t3tools/client-runtime/connection";
​
-export const MOBILE_BACKGROUND_RECONNECT_AFTER_MS = 10_000;
+export const MOBILE_LONG_BACKGROUND_AFTER_MS = 10_000;
​
export type MobileApplicationActiveWakeup = Extract<
Wakeups.ConnectionWakeup,
- "application-active-probe" | "application-active-reconnect"
+ "application-active-probe" | "application-active-long"
>;
​
export function mobileApplicationActiveWakeup(
@@ -12,7 +12,7 @@
activeAtMs: number,
): MobileApplicationActiveWakeup {
return backgroundedAtMs !== null &&
- activeAtMs - backgroundedAtMs >= MOBILE_BACKGROUND_RECONNECT_AFTER_MS
- ? "application-active-reconnect"
+ activeAtMs - backgroundedAtMs >= MOBILE_LONG_BACKGROUND_AFTER_MS
+ ? "application-active-long"
: "application-active-probe";
1 addition and 1 deletionapps/mobile/src/connection/platform.tsModified
View file
@@ -118,7 +118,7 @@
const layerWakeups = Wakeups.layer({
changes: Stream.mergeAll(