Skip to content

Fix old on_subscribe example in callback migration documentation#909

Open
sid3windr wants to merge 1 commit into
eclipse-paho:masterfrom
sid3windr:patch-1
Open

Fix old on_subscribe example in callback migration documentation#909
sid3windr wants to merge 1 commit into
eclipse-paho:masterfrom
sid3windr:patch-1

Conversation

@sid3windr

Copy link
Copy Markdown

I found a copy/paste mistake in the example of the old code; I am fairly sure what I put instead is correct but feel free to correct me if wrong...

Comment thread docs/migrations.rst

# 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants