update
This commit is contained in:
parent
1b8690bc2e
commit
4cc6d3bb21
2
MQTT.py
2
MQTT.py
|
@ -76,7 +76,6 @@ class MQTTClient:
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# print(broker, port, subscribe_topic, publish_topic, username, password)
|
||||
# MQTT客户端
|
||||
MQTT = MQTTClient(broker, port, subscribe_topic, username, password)
|
||||
# 循环连接
|
||||
|
@ -86,6 +85,5 @@ if __name__ == '__main__':
|
|||
# 阻塞监听
|
||||
MQTT.client.loop_forever()
|
||||
except Exception as e:
|
||||
# print(e)
|
||||
# 异常等待时间在进行连接
|
||||
time.sleep(30)
|
||||
|
|
Loading…
Reference in New Issue