def remove_socket(self, socket):
    assert (socket.addr == self.addr)
    socket.close()
    with self.llc.lock:
        try:
            self.sock_list.remove(socket)
        except ValueError:
            pass
        if (len(self.sock_list) == 0):
            self.llc.sap[self.addr] = None
def remove_socket(self, socket):
    assert (socket.addr == self.addr)
    socket.close()
    with self.llc.lock:
        try:
            self.sock_list.remove(socket)
        except ValueError:
            pass
        if (len(self.sock_list) == 0):
            self.llc.sap[self.addr] = None