From 63f8f2ee7feaa06d2d09d9c47520e5d2d9482ac7 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 28 Nov 2014 20:37:23 -0800 Subject: [PATCH] Remote instance closes event forwarding on shutdown --- homeassistant/remote.py | 3 +++ test/test_remote.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/remote.py b/homeassistant/remote.py index 7b28de0fa9e..626e7779d06 100644 --- a/homeassistant/remote.py +++ b/homeassistant/remote.py @@ -142,6 +142,9 @@ class HomeAssistant(ha.HomeAssistant): self.bus.fire(ha.EVENT_HOMEASSISTANT_STOP, 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 self._pool.block_till_done() diff --git a/test/test_remote.py b/test/test_remote.py index 753b9319a8e..d05dda025e0 100644 --- a/test/test_remote.py +++ b/test/test_remote.py @@ -3,6 +3,7 @@ test.remote ~~~~~~~~~~~ Tests Home Assistant remote methods and classes. +Uses port 8122 for master, 8123 for slave """ # pylint: disable=protected-access,too-many-public-methods import unittest @@ -53,8 +54,8 @@ def tearDownModule(): # pylint: disable=invalid-name """ Stops the Home Assistant server and slave. """ global hass, slave - hass.stop() slave.stop() + hass.stop() class TestRemoteMethods(unittest.TestCase):