set loop to None if multiple workers
This commit is contained in:
parent
28396c8620
commit
576b168453
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user