1
0
mirror of https://github.com/elisspace/core.git synced 2026-08-31 00:22:12 +00:00

Do not serve HTTP requests while stopping (#4378)

This commit is contained in:
Paulus Schoutsen
2016-11-14 18:33:53 -08:00
committed by GitHub

View File

@@ -461,6 +461,9 @@ def request_handler_factory(view, handler):
@asyncio.coroutine
def handle(request):
"""Handle incoming request."""
if not view.hass.is_running:
return web.Response(status=503)
remote_addr = view.hass.http.get_real_ip(request)
# Auth code verbose on purpose