set loop to None if multiple workers

This commit is contained in:
Raphael Deem 2017-01-21 14:37:37 -08:00
parent 28396c8620
commit 576b168453

View File

@ -390,6 +390,11 @@ class Sanic:
""" """
server_settings['reuse_port'] = True server_settings['reuse_port'] = True
if server_settings['loop'] is not None:
log.warn("Passing the loop is not supported with multiple"
" workers. The loop paramater has been set to None.")
server_settings['loop'] = None
# Create a stop event to be triggered by a signal # Create a stop event to be triggered by a signal
if stop_event is None: if stop_event is None:
stop_event = Event() stop_event = Event()