提交 92556ea6 编写于 作者: P Pierre Fersing

Fix issue with publish.single/multiple (#119)

Signed-off-by: NPierre Fersing <pierre.fersing@bleemeo.com>
上级 1b9749e7
......@@ -50,9 +50,7 @@ def _do_publish(c):
def _on_connect(c, userdata, flags, rc):
"""Internal callback"""
if rc == 0:
_do_publish(c)
else:
if rc != 0:
raise mqtt.MQTTException(paho.connack_string(rc))
......@@ -172,6 +170,7 @@ def multiple(msgs, hostname="localhost", port=1883, client_id="", keepalive=60,
ciphers=ciphers)
client.connect(hostname, port, keepalive)
_do_publish(client)
client.loop_forever()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册