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

Don't send SUB/UNSUB message with classical nng API #95

Open
JaylinYu opened this issue Jul 29, 2022 · 0 comments
Open

Don't send SUB/UNSUB message with classical nng API #95

JaylinYu opened this issue Jul 29, 2022 · 0 comments
Labels
wontfix This will not be worked on

Comments

@JaylinYu
Copy link
Member

Describe the bug
sending Subscribe or unsubscribe msg with nng_sendmsg/nng_send API will cause memory leak of one SUBACK/UNSUBACK message. So just don't do this, use nng_mqtt_subscribe_async/nng_mqtt_subscribe which will deal with ack msg in its own callback. or you can use nng_send_aio and create your own callback func for suback/unsuback.

Expected behavior
no memleak when sending SUB/UNSUB message with classical nng API, however this is impossible if we wanna implement a sub callback mechanism on basis of nng aio.

@JaylinYu JaylinYu added the wontfix This will not be worked on label Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant