Skip to content
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

Unsuback user callback is invoked with no context #1512

Closed
bretambrose opened this issue Jul 19, 2022 · 3 comments · Fixed by #1922
Closed

Unsuback user callback is invoked with no context #1512

bretambrose opened this issue Jul 19, 2022 · 3 comments · Fixed by #1922
Labels

Comments

@bretambrose
Copy link
Contributor

The unsuback handler calls the user callback with null:

MQTT.js/lib/client.js

Lines 1657 to 1662 in accd78e

case 'unsuback': {
delete this.outgoing[messageId]
this.messageIdProvider.deallocate(messageId)
this._invokeStoreProcessingQueue()
cb(null)
break

There doesn't seem to be a way to get any of the reason codes from the unsuback (let alone reason string and user properties).

Adding the packet to the callback invocation might not be a breaking change, but it might also be a surprise if the recipient was used to a null value for the packet.

@github-actions
Copy link

This is an automated message to let you know that this issue has
gone 365 days without any activity. In order to ensure that we work
on issues that still matter, this issue will be closed in 14 days.

If this issue is still important, you can simply comment with a
"bump" to keep it open.

Thank you for your contribution.

@robertsLando
Copy link
Member

@bretambrose would you like to submit a PR?

Copy link

This is an automated message to let you know that this issue has
gone 365 days without any activity. In order to ensure that we work
on issues that still matter, this issue will be closed in 14 days.

If this issue is still important, you can simply comment with a
"bump" to keep it open.

Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants