def dequeue(self, max_size):
    with self.llc.lock:
        for socket in self.sock_list:
            pdu = socket.dequeue(max_size)
            if pdu:
                return pdu
        else:
            try:
                return self.send_list.popleft()
            except IndexError:
                pass
def dequeue(self, max_size):
    with self.llc.lock:
        for socket in self.sock_list:
            pdu = socket.dequeue(max_size)
            if pdu:
                return pdu
        else:
            try:
                return self.send_list.popleft()
            except IndexError:
                pass