mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Remote instance closes event forwarding on shutdown
This commit is contained in:
parent
cfae4c667a
commit
63f8f2ee7f
@ -142,6 +142,9 @@ class HomeAssistant(ha.HomeAssistant):
|
|||||||
self.bus.fire(ha.EVENT_HOMEASSISTANT_STOP,
|
self.bus.fire(ha.EVENT_HOMEASSISTANT_STOP,
|
||||||
origin=ha.EventOrigin.remote)
|
origin=ha.EventOrigin.remote)
|
||||||
|
|
||||||
|
# Disconnect master event forwarding
|
||||||
|
disconnect_remote_events(self.remote_api, self.local_api)
|
||||||
|
|
||||||
# Wait till all responses to homeassistant_stop are done
|
# Wait till all responses to homeassistant_stop are done
|
||||||
self._pool.block_till_done()
|
self._pool.block_till_done()
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ test.remote
|
|||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|
||||||
Tests Home Assistant remote methods and classes.
|
Tests Home Assistant remote methods and classes.
|
||||||
|
Uses port 8122 for master, 8123 for slave
|
||||||
"""
|
"""
|
||||||
# pylint: disable=protected-access,too-many-public-methods
|
# pylint: disable=protected-access,too-many-public-methods
|
||||||
import unittest
|
import unittest
|
||||||
@ -53,8 +54,8 @@ def tearDownModule(): # pylint: disable=invalid-name
|
|||||||
""" Stops the Home Assistant server and slave. """
|
""" Stops the Home Assistant server and slave. """
|
||||||
global hass, slave
|
global hass, slave
|
||||||
|
|
||||||
hass.stop()
|
|
||||||
slave.stop()
|
slave.stop()
|
||||||
|
hass.stop()
|
||||||
|
|
||||||
|
|
||||||
class TestRemoteMethods(unittest.TestCase):
|
class TestRemoteMethods(unittest.TestCase):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user