def stop(self):
self.stop_serving = True
try:
# This is to force stop the server loop
urllib_request.URLopener().open('http://{}:{}'.format(self.host, self.port))
except IOError:
pass
logging.info('Shutting down the webserver')
self.thread.join()
评论列表
文章目录