-
Notifications
You must be signed in to change notification settings - Fork 522
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
goroutine leak when connectionUp(true) return error #675
Comments
Hmmm, so we probably need to drain |
Hey there! Any idea when we might tackle this issue? Also, could anyone lend a hand with fixing it? |
@kiqi007 I flagged it as "Help Wanted" because I doubt it's something I will get around to in the foreseeable future (don't ever call |
If `Disconnect` was called whilst a connection attempt was in progress a goroutine leak occurred. This change allows the connection attempt to complete as normal (including calling the `OnConnect` callback) before the Disconnect is handled. closes #675
Issue Description: Encountered a goroutine leak scenario when using the MQTT package.
Local Reproduction Steps: Perform the following code changes and simulate network fluctuations.
Issue Cause: Within the code mentioned above, there is no call to Done() between Add() and Wait(), which causes the Wait() method to block indefinitely. To resolve this issue, a call to Done() needs to be properly placed.
The text was updated successfully, but these errors were encountered: