Open gdushang opened 11 months ago
if set client name in flask config,using Mqtt.init_app to init app, client name of mqtt will be set to the default value,
In init App () should be corrected to first obtain the config of Flask, and then set up monitoring self. client ID,
if "MQTT_CLIENT_ID" in app.config: self.client_id = app.config["MQTT_CLIENT_ID"] if isinstance(self.client_id, unicode): self.client._client_id = self.client_id.encode("utf-8") else: self.client._client_id = self.client_id
if set client name in flask config,using Mqtt.init_app to init app, client name of mqtt will be set to the default value,
In init App () should be corrected to first obtain the config of Flask, and then set up monitoring self. client ID,