fix(canvas): port remaining iOS branch stability fixes (#18228)

* fix(canvas): prevent snapshot disconnects on proxied gateways

(cherry picked from commit 2a3c9f746a65f3301c0cfe58ebe6596fed06230f)

* fix(canvas): accept url alias for present and navigate

(cherry picked from commit 674ee86a0b776cbb738add1920a4031246125312)

---------

Co-authored-by: Nimrod Gutman <nimrod.g@singular.net>
This commit is contained in:
Mariano
2026-02-16 16:42:28 +00:00
committed by GitHub
parent c8a536e30a
commit 44ef045614
4 changed files with 55 additions and 12 deletions

View File

@@ -85,7 +85,13 @@ public actor GatewayNodeSession {
latch.resume(result)
}
timeoutTask = Task.detached {
try? await Task.sleep(nanoseconds: UInt64(timeout) * 1_000_000)
do {
try await Task.sleep(nanoseconds: UInt64(timeout) * 1_000_000)
} catch {
// Expected when invoke finishes first and cancels the timeout task.
return
}
guard !Task.isCancelled else { return }
timeoutLogger.info("node invoke timeout fired id=\(request.id, privacy: .public)")
latch.resume(BridgeInvokeResponse(
id: request.id,