Remove redundant as, change method name

This commit is contained in:
Erik Little 2017-09-06 21:08:00 -04:00
parent 3eb7edc37c
commit 5470fb6926
No known key found for this signature in database
GPG Key ID: 4930B7C5FBC1A69D

View File

@ -263,7 +263,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
if forceWebsockets {
polling = false
websocket = true
createWebsocketAndConnect()
createWebSocketAndConnect()
return
}
@ -318,9 +318,9 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
return (urlPolling.url!, urlWebSocket.url!)
}
private func createWebsocketAndConnect() {
ws?.delegate = nil
ws = WebSocket(url: urlWebSocketWithSid as URL)
private func createWebSocketAndConnect() {
ws?.delegate = nil // TODO this seems a bit defensive, is this really needed?
ws = WebSocket(url: urlWebSocketWithSid)
if cookies != nil {
let headers = HTTPCookie.requestHeaderFields(with: cookies!)
@ -475,7 +475,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
}
if !forcePolling && !forceWebsockets && upgradeWs {
createWebsocketAndConnect()
createWebSocketAndConnect()
}
sendPing()