         if forceWebsockets {
             polling = false
             websocket = true
-            createWebsocketAndConnect(true)
+            createWebsocketAndConnect()
             return
         }
 

        return (urlPolling, urlWebSocket)
    }

    private func createWebsocketAndConnect(connect: Bool) {
        let wsUrl = urlWebSocket + (sid == "" ? "" : "&sid=\(sid)")

        ws = WebSocket(url: NSURL(string: wsUrl)!)

        ws?.delegate = self
        ws?.selfSignedSSL = selfSigned

        ws?.connect()
    }
    
    public func didError(error: String) {
