Add a settings in command line and config file to enable discovery

This commit is contained in:
Julien Duponchelle committed 2016-06-16 09:53:32 +02:00
1 parent f45901e861
commit 45d7e09cbd
2 files changed
+7 -2

No files matched your search

+4 -2
View File
@@ -92,6 +92,7 @@ class WebServer:
Cleanly shutdown the server.
"""
if self._handler:
yield from self._handler.finish_connections()
self._handler = None
@@ -115,6 +116,7 @@ class WebServer:
self._loop.stop()
def _signal_handling(self):
def signal_handler(signame, *args):
@@ -289,8 +291,8 @@ class WebServer:
if server_config.getboolean("shell"):
asyncio.async(self.start_shell())
if sys.platform.startswith("linux"):
# UDP discovery is only supported on
if sys.platform.startswith("linux") and server_config.getboolean("udp_discovery"):
# UDP discovery is only supported on Linux
self._loop.run_in_executor(None, self._udp_server_discovery)
try: