1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Change core return code processing (#88326)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
modrisb
2023-02-18 03:56:02 +02:00
committed by GitHub
parent 2ea5811e3a
commit 9fd35d53e7
2 changed files with 42 additions and 2 deletions

View File

@@ -713,6 +713,8 @@ class HomeAssistant:
task.add_done_callback(self._tasks.remove)
task.cancel()
self.exit_code = exit_code
# stage 1
self.state = CoreState.stopping
self.bus.async_fire(EVENT_HOMEASSISTANT_STOP)
@@ -756,8 +758,6 @@ class HomeAssistant:
"Timed out waiting for shutdown stage 3 to complete, the shutdown will"
" continue"
)
self.exit_code = exit_code
self.state = CoreState.stopped
if self._stopped is not None: