File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -36,16 +36,16 @@ extension PusherConnection: WebSocketDelegate {
36
36
for (_, channel) in self . channels. channels {
37
37
channel. subscribed = false
38
38
}
39
-
39
+
40
40
// Handle error (if any)
41
41
guard let error = error where error. code != Int ( WebSocket . CloseCode. Normal. rawValue) else {
42
42
return
43
43
}
44
-
44
+
45
45
print ( " Websocket is disconnected. Error: \( error. localizedDescription) " )
46
-
46
+
47
47
// Reconnect if possible
48
- if let reconnect = self . options. autoReconnect where reconnect {
48
+ if self . options. autoReconnect {
49
49
if let reachability = self . reachability where reachability. isReachable ( ) {
50
50
let operation = NSBlockOperation {
51
51
self . socket. connect ( )
@@ -64,4 +64,3 @@ extension PusherConnection: WebSocketDelegate {
64
64
public func websocketDidConnect( ws: WebSocket ) { }
65
65
public func websocketDidReceiveData( ws: WebSocket , data: NSData ) { }
66
66
}
67
-
You can’t perform that action at this time.
0 commit comments