1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2026-04-02 00:07:16 +01:00
Files
supervisor/tests
Stefan Agner 58bb0c909d Guard shutdown() for STOPPING/CLOSE and unload host early in stop()
Move host.unload() before Stage 1 in stop() so the shutdown monitor
task is cancelled before infrastructure teardown begins. This prevents
a race where the monitor could react to PrepareForShutdown after
stop() has already started tearing down.

For the remaining edge case where shutdown() is called while stop()
is running, log a warning and return immediately instead of awaiting
the shutdown event (which would deadlock since stop() never sets it).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 15:27:56 +01:00
..
2026-03-16 15:27:55 +01:00
2026-03-16 15:27:55 +01:00