-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client._on_connect exception rc type error #58
Comments
Hi Jakob, thanks for raising this issue. Let me have a look. :) I think you're right. The following is an excerpt from paho-mqtt: def on_connect(self, func):
""" Define the connect callback implementation.
Expected signature for MQTT v3.1 and v3.1.1 is:
connect_callback(client, userdata, flags, rc, properties=None)
and for MQTT v5.0:
connect_callback(client, userdata, flags, reasonCode, properties)
client: the client instance for this callback
userdata: the private user data as set in Client() or userdata_set()
flags: response flags sent by the broker
rc: the connection result
reasonCode: the MQTT v5.0 reason code: an instance of the ReasonCode class.
ReasonCode may be compared to interger. The connect callback gets:
We should update the types to reflect this. Do you want to submit a pull request? Note that |
Merged
And thanks for keeping me honest - never report a bug without a PR is a golden rule! :-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems that https://github.com/sbtinstruments/asyncio-mqtt/blob/master/asyncio_mqtt/client.py#L387 may yield an error as
rc
ispaho.mqtt.reasoncodes.ReasonCodes
and not an integer?The text was updated successfully, but these errors were encountered: