fix: 改用loop_forever

This commit is contained in:
caoqianming 2024-06-13 11:37:37 +08:00
parent 7741928edc
commit fb661ed02d
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ def start_mqtt():
client.on_message = on_message client.on_message = on_message
client.on_disconnect = on_disconnect client.on_disconnect = on_disconnect
client.connect(host=conf.MQTT_HOST, port=conf.MQTT_PORT) client.connect(host=conf.MQTT_HOST, port=conf.MQTT_PORT)
client.loop_start() client.loop_forever()
if __name__ == '__main__': if __name__ == '__main__':