     //AsyncSocket Delegate
     
     func socket(sock: GCDAsyncSocket!, didConnectToHost host: String!, port: UInt16) {
+        #if DEBUG
         NSLog("CocoaMQTT: connected to \(host) : \(port)")
+        #endif
         connState = CocoaMQTTConnState.CONNECTED
         let frame = CocoaMQTTFrameConnect(client: self)
         send(frame)

        reader = CocoaMQTTReader(socket: socket!, delegate: self)
        var err: NSError?
        if !socket!.connectToHost(self.host, onPort: self.port, error: &err) {
            NSLog("CocoaMQTT: socket connect error: \(err?.description)")
            return false
        }
        connState = CocoaMQTTConnState.CONNECTING


    func didReceiveConnAck(reader: CocoaMQTTReader, connack: UInt8) {
        connState = CocoaMQTTConnState.CONNECTED
        #if DEBUG
        NSLog("CocoaMQTT: CONNACK Received: \(connack)")
        #endif
        
        //keep alive
        if keepAlive > 0 {
            aliveTimer = MSWeakTimer.scheduledTimerWithTimeInterval(
