提交 9a4941ef 编写于 作者: R Roger Light

PUBACK messages are now sent only after on_message has returned.

上级 e72edac0
......@@ -12,6 +12,8 @@ v1.6.0 - 2021-xx-xx
- The `rc` parameter in the `on_disconnect` callback now has meaningful values
in the case of an error. Closes #441.
- Callbacks can now be applied to client instances using decorators.
- PUBACK messages are now sent to the broker only after the on_message
callback has returned.
v1.5.1 - 2020-09-22
......
......@@ -3313,9 +3313,8 @@ class Client(object):
self._handle_on_message(message)
return MQTT_ERR_SUCCESS
elif message.qos == 1:
rc = self._send_puback(message.mid)
self._handle_on_message(message)
return rc
return self._send_puback(message.mid)
elif message.qos == 2:
rc = self._send_pubrec(message.mid)
message.state = mqtt_ms_wait_for_pubrel
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册