fastybird_fb_mqtt_connector/connector.py
def stop(self) -> None:
        """Close all opened connections & stop connector"""
        if self.__client is not None:
            self.__client.stop()

        # When connector is closing...
        for device in self.__devices_registry:
            # ...set device state to disconnected
            self.__devices_registry.set_state(device=device, state=ConnectionState.DISCONNECTED)

        self.__events_listener.close()

        self.__logger.info("Connector has been stopped")

        self.__stopped = True
Close all opened connections & stop connector
Close all opened connections & stop connector
Close all opened connections & stop connector
def stop(self) -> None:
        if self.__client is not None:
            self.__client.stop()
        for device in self.__devices_registry:
            self.__devices_registry.set_state(device=device, state=ConnectionState.DISCONNECTED)
        self.__events_listener.close()
        self.__logger.info("Connector has been stopped")
        self.__stopped = True
def stop ( self ) -> None : if self . __client is not None : self . __client . stop ( ) for device in self . __devices_registry : self . __devices_registry . set_state ( device = device , state = ConnectionState . DISCONNECTED ) self . __events_listener . close ( ) self . __logger . info ( "Connector has been stopped" ) self . __stopped = True
Close all opened connections & stop connector
Close all opened connections & stop connector
"""Close all opened connections & stop connector""" # When connector is closing... # ...set device state to disconnected
self