def serve_forever(self, host, port, block=False):
        if self._block is not None:
            raise AssertionError(
                'Server already started. Please create new one instead of trying to reuse.')
        if not block:
            self.thread = self._thread_class(target=self._serve_forever, args=(host, port))
            self.thread.setDaemon(True)
            if self._thread_name:
                self.thread.setName(self._thread_name)
            self.thread.start()
        else:
            self._serve_forever(host, port)
        self._block = block