From 7b1163f75c2bd2741dd9b62ae895068680261412 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 14 Dec 2025 03:00:40 +0000 Subject: [PATCH] fix(ios): satisfy Sendable in bridge timeout --- apps/ios/Sources/Bridge/BridgeSession.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/ios/Sources/Bridge/BridgeSession.swift b/apps/ios/Sources/Bridge/BridgeSession.swift index 08246a3f1..1540471cd 100644 --- a/apps/ios/Sources/Bridge/BridgeSession.swift +++ b/apps/ios/Sources/Bridge/BridgeSession.swift @@ -87,10 +87,10 @@ actor BridgeSession { } guard let line = try await Self.withTimeout(seconds: 6, operation: { - try await self.receiveLine() - }), - let data = line.data(using: .utf8), - let base = try? self.decoder.decode(BridgeBaseFrame.self, from: data) + try await self.receiveLine() + }), + let data = line.data(using: .utf8), + let base = try? self.decoder.decode(BridgeBaseFrame.self, from: data) else { await self.disconnect() throw NSError(domain: "Bridge", code: 1, userInfo: [ @@ -310,7 +310,7 @@ actor BridgeSession { } } - private static func withTimeout( + private static func withTimeout( seconds: Double, operation: @escaping @Sendable () async throws -> T) async throws -> T { @@ -354,7 +354,7 @@ actor BridgeSession { _ stateStream: AsyncStream, timeoutSeconds: Double) async throws { - try await Self.withTimeout(seconds: timeoutSeconds) { + try await self.withTimeout(seconds: timeoutSeconds) { for await state in stateStream { switch state { case .ready: