     }
     
     public func cancelSending() {
-        self.logDispatchQueue.cancelAllOperations()
-        self.socketManager.disconnect()
+        logDispatchQueue.cancelAllOperations()
+        socketManager.disconnect()
     }
     
     // MARK: - Log dispatching

    }
    
    func writeLogs() {
        
        self.logDispatchQueue.addOperation{ [weak self, weak socketManager] in
            guard let logsToShip = self?.logsToShip else { return }
            guard let dataToShip = self?.dataToShip else { return }
            guard let socketManager = socketManager else { return }

            for log in logsToShip.sorted(by: { $0.0 < $1.0 }) {
                let logData = dataToShip(log.1)
                socketManager.write(logData, withTimeout: socketManager.timeout, tag: log.0)
            }
            

        let logTag = Int(truncatingBitPattern: time)
        logsToShip[logTag] = dict
    }
}

// MARK: - GCDAsyncSocketManager Delegate
