'Start listener in a background thread'

def start(self):

    server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    server_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    server_sock.bind(('', 0))
    server_sock.listen(1)
    host = util.get_ip_address()
    port = server_sock.getsockname()[1]
    addr = (host, port)
    logging.info('listening    for    reservations    at    {0}'.format(addr))
    def _listen(self, sock):
        CONNECTIONS = []
        CONNECTIONS.append(sock)
        while (not self.done):
            (read_socks, write_socks, err_socks) = select.select(CONNECTIONS, [], [], 60)
            for sock in read_socks:
                if (sock == server_sock):
                    (client_sock, client_addr) = sock.accept()
                    CONNECTIONS.append(client_sock)
                    logging.debug('client    connected    from    {0}'.format(client_addr))
                else:
                    try:
                        msg = self.receive(sock)
                        self.handle_message(sock, msg)
                    except Exception as e:
                        logging.debug(e)
                        sock.close()
                        CONNECTIONS.remove(sock)
        server_sock.close()
    t = threading.Thread(target=_listen, args=(self, server_sock))
    t.daemon = True
    t.start()
    return addr
