Remove redundant as, change method name
This commit is contained in:
parent
3eb7edc37c
commit
5470fb6926
@ -263,7 +263,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
if forceWebsockets {
|
if forceWebsockets {
|
||||||
polling = false
|
polling = false
|
||||||
websocket = true
|
websocket = true
|
||||||
createWebsocketAndConnect()
|
createWebSocketAndConnect()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -318,9 +318,9 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
return (urlPolling.url!, urlWebSocket.url!)
|
return (urlPolling.url!, urlWebSocket.url!)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func createWebsocketAndConnect() {
|
private func createWebSocketAndConnect() {
|
||||||
ws?.delegate = nil
|
ws?.delegate = nil // TODO this seems a bit defensive, is this really needed?
|
||||||
ws = WebSocket(url: urlWebSocketWithSid as URL)
|
ws = WebSocket(url: urlWebSocketWithSid)
|
||||||
|
|
||||||
if cookies != nil {
|
if cookies != nil {
|
||||||
let headers = HTTPCookie.requestHeaderFields(with: cookies!)
|
let headers = HTTPCookie.requestHeaderFields(with: cookies!)
|
||||||
@ -475,7 +475,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !forcePolling && !forceWebsockets && upgradeWs {
|
if !forcePolling && !forceWebsockets && upgradeWs {
|
||||||
createWebsocketAndConnect()
|
createWebSocketAndConnect()
|
||||||
}
|
}
|
||||||
|
|
||||||
sendPing()
|
sendPing()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user