Skip to content

Commit 83daecc

Browse files
committed
remove not needed comments
1 parent 7ce8f15 commit 83daecc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

AmplifyPlugins/Core/AWSPluginsCore/WebSocket/WebSocketClient.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -248,18 +248,18 @@ extension WebSocketClient: URLSessionWebSocketDelegate {
248248

249249
let nsError = error as NSError
250250
switch (nsError.domain, nsError.code) {
251-
case (NSURLErrorDomain.self, NSURLErrorNetworkConnectionLost), // connection lost (-1005)
252-
(NSURLErrorDomain.self, NSURLErrorCannotConnectToHost), // -1004 should be -1001, but -1004 is CannotConnectToHost
253-
(NSURLErrorDomain.self, NSURLErrorTimedOut), // -1001
254-
(NSURLErrorDomain.self, NSURLErrorNotConnectedToInternet), // -1009
255-
(NSURLErrorDomain.self, NSURLErrorDataNotAllowed), // -1020
256-
(NSPOSIXErrorDomain.self, Int(ECONNABORTED)), // background to foreground
257-
(NSPOSIXErrorDomain.self, 57): // Socket is not connected (ENOTCONN)
251+
case (NSURLErrorDomain.self, NSURLErrorNetworkConnectionLost),
252+
(NSURLErrorDomain.self, NSURLErrorCannotConnectToHost),
253+
(NSURLErrorDomain.self, NSURLErrorTimedOut),
254+
(NSURLErrorDomain.self, NSURLErrorNotConnectedToInternet),
255+
(NSURLErrorDomain.self, NSURLErrorDataNotAllowed),
256+
(NSPOSIXErrorDomain.self, Int(ECONNABORTED)),
257+
(NSPOSIXErrorDomain.self, 57):
258258
self.subject.send(.error(WebSocketClient.Error.connectionLost))
259259
Task { [weak self] in
260260
await self?.networkMonitor.updateState(.offline)
261261
}
262-
case (NSURLErrorDomain.self, NSURLErrorCancelled): // -999
262+
case (NSURLErrorDomain.self, NSURLErrorCancelled):
263263
log.debug("Skipping NSURLErrorCancelled error")
264264
self.subject.send(.error(WebSocketClient.Error.connectionCancelled))
265265
default:

0 commit comments

Comments
 (0)