     private func treatSendQueue() {
         dispatch_semaphore_wait(sendQueueLock, DISPATCH_TIME_FOREVER)
         if (self.sendQueue.count <= 0){
+            Logger.Debug("Send queue is empty, stopping to process")
             sendQueueProcessing = false
             return
         }

    
    init (delegate : IRCConnectionDelegate) {
        let queueAttr = dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_SERIAL, QOS_CLASS_BACKGROUND, 0)
        connectionQueue = dispatch_queue_create("com.twitch.ircchatconnection", queueAttr)
        status = .Disconnected
        sendQueue = [NSData]()
        sendQueueLock = dispatch_semaphore_create(1)

    }
    
    private func startSendQueue() {
        if sendQueueProcessing {
            Logger.Warning("Send queue is already processing")
            return
        }
        
        sendQueueProcessing = true

        let timeInterval = (queueWait != nil && queueWait!.timeIntervalSinceNow > 0) ? queueWait!.timeIntervalSinceNow : minimumSendQueueDelay
        let dispatchTime: dispatch_time_t = dispatch_time(DISPATCH_TIME_NOW, Int64(timeInterval * Double(NSEC_PER_SEC)))
        dispatch_after(dispatchTime, dispatch_get_main_queue(), {
            Logger.Debug("Starting to process send queue")
            self.treatSendQueue()
        })
    }
