     
     private var chatConnection : GCDAsyncSocket?
     private var connectionQueue : dispatch_queue_t
-    private let queueLock : dispatch_semaphore_t
+    private let sendQueueLock : dispatch_semaphore_t
     private var sendQueue : [AnyObject]
     private var status : ChatConnectionStatus
     private var lastConnectAttempt : NSDate?

        //            [strongSelf _writeDataToServer:data];
        //            });
        
        dispatch_semaphore_signal(queueLock)
    }
}


    }
    
    private func _sendQueue() {
        dispatch_semaphore_wait(sendQueueLock, DISPATCH_TIME_FOREVER)
        if (self.sendQueue.count <= 0){
            sendQueueProcessing = false
            return
        }
        dispatch_semaphore_signal(sendQueueLock)
        
        if queueWait != nil && queueWait?.timeIntervalSinceNow > 0 {
            let dispatchTime: dispatch_time_t = dispatch_time(DISPATCH_TIME_NOW, Int64(queueWait!.timeIntervalSinceNow * Double(NSEC_PER_SEC)))
