                         this?.doPoll()
                     }
                 }
-            }}.resume()
+            }
+        }
     }
 
     // We had packets waiting for send when we upgraded

            }
        }
        
        doRequest(req)
    }

    private func doRequest(req: NSMutableURLRequest) {
        if !polling || closed {
            return
        }

        req.cachePolicy = NSURLRequestCachePolicy.ReloadIgnoringLocalAndRemoteCacheData

        Logger.log("Doing polling request", type: logType)

        session.dataTaskWithRequest(req) {[weak self] data, res, err in
            if let this = self {
                if err != nil || data == nil {
                    if this.polling {

            }
        }
        
        doLongPoll(reqPolling)
    }

    private func parsePollingMessage(str: String) {
