             return
         }
         
-        dispatch_semaphore_wait(queueLock, DISPATCH_TIME_FOREVER)
+        dispatch_semaphore_wait(sendQueueLock, DISPATCH_TIME_FOREVER)
         
         //        NSData *data = nil;
         //        @synchronized( _sendQueue ) {

    
    private func resetSendQueueInterval() {
        self.stopSendQueue()
        dispatch_semaphore_wait(queueLock, DISPATCH_TIME_FOREVER)
        if (self.sendQueue.count > 0){
            startSendQueue()
        }
        dispatch_semaphore_signal(queueLock)
    }
    
    private func startSendQueue() {

        connectionQueue = dispatch_queue_create("com.twitch.ircchatconnection", queueAttr)
        status = .Disconnected
        sendQueue = [AnyObject]()
        sendQueueLock = dispatch_semaphore_create(1)
    }
    
    func connect() {
