 
     deinit {
         Logger.log("Engine is being deinit", type: logType)
+        closed = true
         stopPolling()
     }
     

                        this?.doPoll()
                    }
                }
            }}.resume()
    }

    // We had packets waiting for send when we upgraded

                    }
                    return
                }
                
                Logger.log("Got polling response", type: this.logType)
                
                if let str = NSString(data: data!, encoding: NSUTF8StringEncoding) as? String {
                    dispatch_async(this.parseQueue) {[weak this] in
                        this?.parsePollingMessage(str)
                    }
                }
                
                this.waitingForPoll = false
                
                if this.fastUpgrade {
                    this.doFastUpgrade()
                } else if !this.closed && this.polling {
                    this.doPoll()
                }
            }
        }
    }

    private func flushProbeWait() {
