hass-core/homeassistant/components/http
Stefan Agner ab25c5a2bd
Shutdown asyncio http server within 10 seconds ()
If there are open requests, the http server waits up to 60 seconds.
However, some requests (such as the Reboot button) seems to keep a
connection open and needlessly slow down the reboot process:

```
Jan 11 00:52:54 homeassistant eb034fca9c7d[404]: 2021-01-11 00:52:54 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event homeassistant_stop[L]>
Jan 11 00:52:54 homeassistant eb034fca9c7d[404]: 2021-01-11 00:52:54 DEBUG (MainThread) [homeassistant.helpers.restore_state] Dumping states 111
Jan 11 00:52:54 homeassistant eb034fca9c7d[404]: 2021-01-11 00:52:54 DEBUG (MainThread) [homeassistant.helpers.restore_state] Dumping states
Jan 11 00:52:54 homeassistant eb034fca9c7d[404]: 2021-01-11 00:52:54 INFO (MainThread) [homeassistant.components.websocket_api.http.connection] [281473359593728] Connection closed by client
Jan 11 00:52:56 homeassistant eb034fca9c7d[404]: 2021-01-11 00:52:56 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [281473359593728] Disconnected
Jan 11 00:53:54 homeassistant eb034fca9c7d[404]: 2021-01-11 00:53:54 DEBUG (MainThread) [homeassistant.core] Waited 60 seconds for task: <Task pending name='Task-585' coro=<async_setup.<locals>.stop_server() running at /usr/src/homeassistant/homeassistant/components/http/__init__.py:228> wait_for=<_GatheringFuture pending cb=[<TaskWakeupMethWrapper object at 0xffff9f112f70>()]> cb=[_wait.<locals>._on_completion() at /usr/local/lib/python3.8/asyncio/tasks.py:518]>
...
```
2021-01-11 09:36:14 +01:00
..
__init__.py Add log message server startup () 2020-11-13 14:39:50 +01:00
auth.py Improve X-Forwarded-* request headers handling () 2020-08-11 22:57:50 +02:00
ban.py Use utcnow from date util for http.ban () 2020-11-27 17:04:52 +01:00
const.py Improve X-Forwarded-* request headers handling () 2020-08-11 22:57:50 +02:00
cors.py
data_validator.py Log lines do not end with a full stop () 2020-07-05 23:04:19 +02:00
forwarded.py Exception chaining and wrapping improvements () 2020-08-28 13:50:32 +02:00
manifest.json Remove unused manifest fields () 2020-04-03 12:58:19 -07:00
request_context.py Add current request context to get_url helper () 2020-08-09 14:07:31 +02:00
static.py
view.py Exception chaining and wrapping improvements () 2020-08-28 13:50:32 +02:00
web_runner.py Shutdown asyncio http server within 10 seconds () 2021-01-11 09:36:14 +01:00