From a7d17fae449c296491ae84235c1d5ed76c882feb Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Fri, 21 Apr 2017 17:06:52 -0500 Subject: [PATCH] Fix duplicate signal settings for gunicorn worker --- sanic/worker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sanic/worker.py b/sanic/worker.py index 7a8303d8..b2f5af17 100644 --- a/sanic/worker.py +++ b/sanic/worker.py @@ -3,6 +3,7 @@ import sys import signal import asyncio import logging + try: import ssl except ImportError: @@ -50,8 +51,8 @@ class GunicornWorker(base.Worker): debug=is_debug, protocol=protocol, ssl=self.ssl_context, - run_async=True - ) + run_async=True) + self._server_settings['signal'] = self.signal self._server_settings.pop('sock') trigger_events(self._server_settings.get('before_start', []), self.loop) @@ -97,7 +98,6 @@ class GunicornWorker(base.Worker): self.servers.append(await serve( sock=sock, connections=self.connections, - signal=self.signal, **self._server_settings ))