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

Fix the issue c.expectConnack goroutine doesn't exit #101 #117

Merged

Conversation

tomatod
Copy link
Contributor

@tomatod tomatod commented Jan 21, 2023

This patch is for fixing #101. As I commented in the GitHub issue, it can be easily reproduced and causes goroutine leak (memory leak). After the patch is applied, it cannot be reproduced by the reproduction code in the GitHub issue.

To prevent the issue c.expectConnack goroutine doesn't exit, caPacketCh and caPacketErr is changed to buffered channels from unbuffered one. comment are also added so that the buffers won't get deleted in future fixes.

closes #101

Signed-off-by: Daichi Tomaru <banaoa7543@gmail.com>
@MattBrittan MattBrittan merged commit e81a8c4 into eclipse-paho:master May 18, 2023
@MattBrittan
Copy link
Contributor

Thanks for doing this - sorry for the delay in reviewing.

@tomatod tomatod deleted the fix-connack-goroutine-not-exit branch February 18, 2024 07:17
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.

expectConnack goroutine not exit
2 participants