commit 51ae00c0cc3cb2bf39e1d64c32ea7109675c7af6
parent b55539b241a7d1967ce2dc5e012e2003a950ceae
Author: Michael Camilleri <[email protected]>
Date: Thu, 4 Jun 2026 08:04:03 +0900
Tweak grace periods
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Crossmate/Services/AppServices.swift b/Crossmate/Services/AppServices.swift
@@ -74,13 +74,13 @@ final class AppServices {
/// a shared grid, then leaves — within this window should fan out nothing.
/// The begin push is deferred by this much and cancelled if the user backs
/// out (app backgrounded or navigated away) before it elapses.
- static let sessionBeginGrace: TimeInterval = 30
+ static let sessionBeginGrace: TimeInterval = 10
private var pendingSessionBeginTasks: [UUID: Task<Void, Never>] = [:]
/// Grace window before a backgrounded session is treated as ended. A
/// briefly-backgrounded puzzle (phone sleep, app switcher peek, taking a
/// call) should not fan out pause/play pings to peers on every flicker —
/// only a sustained absence does.
- static let sessionEndGrace: TimeInterval = 120
+ static let sessionEndGrace: TimeInterval = 30
private var pendingSessionEndTasks: [UUID: Task<Void, Never>] = [:]
/// Background-execution assertions keeping the matching grace timer alive
/// after the app is backgrounded. iOS grants only a limited budget (often