'Stop the HTTP server.'

def stop(self):

    if self.running:
        self.httpserver.stop()
        if isinstance(self.bind_addr, tuple):
            wait_for_free_port(*self.bind_addr)
        self.running = False
        self.bus.log(('HTTP    Server    %s    shut    down' % self.httpserver))
    else:
        self.bus.log(('HTTP    Server    %s    already    shut    down' % self.httpserver))
