From 06e97e91fa13583ca6aa008ce641faa9e819a926 Mon Sep 17 00:00:00 2001 From: Michael Law <1365977+lawmicha@users.noreply.github.com> Date: Thu, 9 Nov 2023 13:13:52 -0500 Subject: [PATCH] apply duplicate change to Async version of the file --- .../RealtimeConnectionProviderAsync+Websocket.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/AppSyncRealTimeClient/ConnectionProvider/AppsyncRealtimeConnectionAsync/RealtimeConnectionProviderAsync+Websocket.swift b/AppSyncRealTimeClient/ConnectionProvider/AppsyncRealtimeConnectionAsync/RealtimeConnectionProviderAsync+Websocket.swift index 95057f43..a565a3d6 100644 --- a/AppSyncRealTimeClient/ConnectionProvider/AppsyncRealtimeConnectionAsync/RealtimeConnectionProviderAsync+Websocket.swift +++ b/AppSyncRealTimeClient/ConnectionProvider/AppsyncRealtimeConnectionAsync/RealtimeConnectionProviderAsync+Websocket.swift @@ -30,7 +30,13 @@ extension RealtimeConnectionProviderAsync: AppSyncWebsocketDelegate { self.updateCallback(event: .connection(self.status)) return } - self.updateCallback(event: .error(ConnectionProviderError.connection(nil, nil))) + #if os(watchOS) + self.updateCallback(event: .error(ConnectionProviderError.connection( + "This API uses low-level networking (websockets). Running on watchOS only works for specific circumstances.", + error))) + #else + self.updateCallback(event: .error(ConnectionProviderError.connection(nil, error))) + #endif } }