提交 cc94fc8b 编写于 作者: R Roger Light

Fix on_disconnect() using wrong callback.

It would sometimes call the MQTT v3.x callback when it should
call the MQTT v5 callback.

Closes #570. Thanks to Frank Pagliughi.
上级 e72010a0
......@@ -21,6 +21,8 @@ v1.6.0 - 2021-xx-xx
_out_packet queue use to thread safe.
- Add basic MQTT v5 support to the subscribe and publish helper functions.
Closes #575.
- Fix on_disconnect() sometimes calling the MQTT v3.x callback when it should
call the MQTT v5 callback. Closes #570.
v1.5.1 - 2020-09-22
......
......@@ -3413,7 +3413,7 @@ class Client(object):
if on_disconnect:
with self._in_callback_mutex:
try:
if properties:
if self._protocol == MQTTv5:
on_disconnect(
self, self._userdata, rc, properties)
else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册