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

Async sample callback context fix. #1382

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

CIPop
Copy link
Contributor

@CIPop CIPop commented Jul 21, 2023

Fixing MQTTAsync sample callback context: within the callback, the context is casted to the client handle but configured as 'NULL'. This causes a crash when the connection is lost.

Repro steps

  • Set a breakpoint in onConnect

  • In another terminal:

netstat | grep 1883
tcp        0      0 mydevstation:32132 137.135.83.217:1883     ESTABLISHED

sudo ss -K dst 137.135.83.217 dport = 1883
  • Resume execution after the connection is dropped

Expected: sample reconnects (connlost is called).
Actual: crash in MQTTAsync_connect as client is NULL.

@icraggs icraggs merged commit 43a7b48 into eclipse-paho:develop Oct 9, 2023
2 checks passed
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.

3 participants