                         fail("Invalid server response")
                     }
                 } else {
-                    
-                    if let s = self.socket {
-                        if s.readyState != SRReadyState.OPEN {
-                            self.reconnectWebSocket()
-                        }
-                    }
                     
                     if let data = JSON as? [[String : AnyObject]] {
                         

    
    private func reconnectWebSocket() {
        
        // close and tidy if we already had a socket
        if let s = socket {
            s.close()

                    if let data = JSON as? [String : AnyObject] {
                        let u = User.sharedInstance
                        u.setValuesForKeysWithDictionary(data)
                        
                        self.reconnectWebSocket()
                        
                        onSuccess(u)
                    } else {
                        if let fail = onFailure {
