diff --git a/pychromecast/socket_client.py b/pychromecast/socket_client.py index 0d639fd50..7c6e93f0e 100644 --- a/pychromecast/socket_client.py +++ b/pychromecast/socket_client.py @@ -651,6 +651,7 @@ def _check_connection(self): reset = True if reset: + self.receiver_controller.disconnected() for channel in self._open_channels: self.disconnect_channel(channel) self._report_connection_status( @@ -1078,6 +1079,11 @@ def __init__(self, cast_type=CAST_TYPE_CHROMECAST): self._status_listeners = [] self._launch_error_listeners = [] + def disconnected(self): + """ Called when disconnected. Will erase status. """ + self.logger.info("Receiver:channel_disconnected") + self.status = None + @property def app_id(self): """ Convenience method to retrieve current app id. """