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: