Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/migrations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ on_subscribe
# error processing

# OLD code for MQTTv5
def on_disconnect(client, userdata, mid, reason_codes, properties):
def on_subscribe(client, userdata, mid, granted_qos, rc, properties=None):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe in MQTTv5, the granted_qos was absent (see calling code in v1.6.1).

That's probably why I made a copy/paste mistake, because in MQTTv5 there is no migration for on_subscribe. But I think it still better to explicitly show old code for MQTTv5, even if unchanged for migration.

for sub_result in reason_codes:
if sub_result == 1:
# process QoS == 1
Expand Down