Merge pull request #652 from 38elements/signal-stopped

Fix `this.signal.stopped` is `True` #639
This commit is contained in:
Raphael Deem 2017-04-20 13:06:28 -07:00 committed by GitHub
commit 6ce0050979

View File

@ -16,7 +16,7 @@ from sanic.handlers import ErrorHandler
from sanic.log import log from sanic.log import log
from sanic.response import HTTPResponse, StreamingHTTPResponse from sanic.response import HTTPResponse, StreamingHTTPResponse
from sanic.router import Router from sanic.router import Router
from sanic.server import serve, serve_multiple, HttpProtocol from sanic.server import serve, serve_multiple, HttpProtocol, Signal
from sanic.static import register as static_register from sanic.static import register as static_register
from sanic.testing import SanicTestClient from sanic.testing import SanicTestClient
from sanic.views import CompositionView from sanic.views import CompositionView
@ -674,6 +674,7 @@ class Sanic:
'port': port, 'port': port,
'sock': sock, 'sock': sock,
'ssl': ssl, 'ssl': ssl,
'signal': Signal(),
'debug': debug, 'debug': debug,
'request_handler': self.handle_request, 'request_handler': self.handle_request,
'error_handler': self.error_handler, 'error_handler': self.error_handler,