             self._reconnecting = true
             
             dispatch_async(dispatch_get_main_queue()) {[weak self] in
-                if self == nil {
-                    return
-                }
-                
-                self?.reconnectTimer = NSTimer.scheduledTimerWithTimeInterval(Double(self!.reconnectWait),
-                    target: self!, selector: "tryReconnect", userInfo: nil, repeats: true)
+                if let this = self {
+                    this.reconnectTimer = NSTimer.scheduledTimerWithTimeInterval(Double(this.reconnectWait),
+                        target: this, selector: "tryReconnect", userInfo: nil, repeats: true)
+                }
             }
         }
         

    // If the server wants to know that the client received data
    func emitAck(ack:Int, withData args:[AnyObject]) {
        dispatch_async(self.emitQueue) {[weak self] in
            if self == nil || !self!.connected {
                return
            }
            
            let packet = SocketPacket(type: nil, data: args, nsp: self!.nsp, id: ack)
            let str:String
            
            SocketParser.parseForEmit(packet)
            str = packet.createAck()
            
            SocketLogger.log("Emitting Ack: \(str)", client: self!)
            
            if packet.type == SocketPacket.PacketType.BINARY_ACK {
                self?.engine?.send(str, withData: packet.binary)
            } else {
                self?.engine?.send(str, withData: nil)
            }
        }
    }

    
    private func createOnAck(event:String, items:[AnyObject]) -> OnAckCallback {
        return {[weak self, ack = ++self.currentAck] timeout, callback in
            if let this = self {
                this.ackHandlers.addAck(ack, callback: callback)
                
                dispatch_async(this.emitQueue) {[weak this] in
                    this?._emit(event, items, ack: ack)
                }
                
                if timeout != 0 {
                    let time = dispatch_time(DISPATCH_TIME_NOW, Int64(timeout * NSEC_PER_SEC))
                    
                    dispatch_after(time, dispatch_get_main_queue()) {[weak this] in
                        this?.ackHandlers.timeoutAck(ack)
                    }
                }
            }
        }
