From b583147fba261c323db89f1ea2aa586d0680e248 Mon Sep 17 00:00:00 2001 From: Raphael Deem Date: Sun, 26 Mar 2017 12:07:42 -0700 Subject: [PATCH] fix multiple worker issue --- sanic/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sanic/server.py b/sanic/server.py index 00bb2331..422badd1 100644 --- a/sanic/server.py +++ b/sanic/server.py @@ -451,8 +451,8 @@ def serve_multiple(server_settings, workers, stop_event=None): if stop_event is None: stop_event = Event() - signal_func(SIGINT, lambda s, f: stop_event.set()) - signal_func(SIGTERM, lambda s, f: stop_event.set()) + signal_func(SIGINT, lambda s, f: loop.close()) + signal_func(SIGTERM, lambda s, f: loop.close()) processes = [] for _ in range(workers):