Skip to content

Commit bb38c0f

Browse files
committed
Adjust WebSocket error logging copy.
1 parent 8bdc9cd commit bb38c0f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/Extensions/PusherWebsocketDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ extension PusherConnection: WebSocketConnectionDelegate {
143143
}
144144

145145
func webSocketDidReceiveError(connection: WebSocketConnection, error: Error) {
146-
self.delegate?.debugLog?(message: PusherLogger.debug(for: .disconnectionWithError,
146+
self.delegate?.debugLog?(message: PusherLogger.debug(for: .errorReceived,
147147
context: "Error (code: \((error as NSError).code)): \(error.localizedDescription)"))
148148
}
149149
}

Sources/Helpers/PusherLogger.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ internal class PusherLogger {
3232
"Connection state is 'connected' but received network reachability change so going to call attemptReconnect"
3333
case attemptReconnectionAfterWaiting = "Attempting to reconnect after waiting"
3434
case connectionEstablished = "Socket established with socket ID:"
35-
case disconnectionWithError = "Websocket is disconnected."
3635
case disconnectionWithoutError = "Websocket is disconnected but no error received"
36+
case errorReceived = "Websocket received error."
3737
case intentionalDisconnection = "Deliberate disconnection - skipping reconnect attempts"
3838
case maxReconnectAttemptsLimitReached = "Max reconnect attempts reached"
3939
case reconnectionFailureLikely = "Network unreachable so reconnect likely to fail"

0 commit comments

Comments
 (0)