Revert "Ensure frontend is available if integrations fail to start - Part 1 of 2 (#36093)" (#36251)

This reverts commit fbe7b4ddfa.
This commit is contained in:
Pascal Vizeli 2020-05-29 10:18:39 +02:00 committed by GitHub
parent 08f2714e57
commit ed014e3c96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 63 additions and 173 deletions

View file

@ -31,9 +31,7 @@ def async_response(
@wraps(func)
def schedule_handler(hass, connection, msg):
"""Schedule the handler."""
# As the webserver is now started before the start
# event we do not want to block for websocket responders
hass.loop.create_task(_handle_async_response(func, hass, connection, msg))
hass.async_create_task(_handle_async_response(func, hass, connection, msg))
return schedule_handler

View file

@ -165,9 +165,7 @@ class WebSocketHandler:
EVENT_HOMEASSISTANT_STOP, handle_hass_stop
)
# As the webserver is now started before the start
# event we do not want to block for websocket responses
self._writer_task = self.hass.loop.create_task(self._writer())
self._writer_task = self.hass.async_create_task(self._writer())
auth = AuthPhase(self._logger, self.hass, self._send_message, request)
connection = None