-
Notifications
You must be signed in to change notification settings - Fork 105
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
PING message interval is not handled properly #287
Comments
@ademyankov Thanks for pointing this out. I'll get it over to our coreMQTT experts. |
Which version of coreMQTT are you using? @ademyankov |
@Pooja-Toshniwal v2.1.1 |
After investigating, it appears that the problem you encountered with unnecessary MQTT_Ping invocations is present in the older version (2.1.1) of the FreeRTOS coreMQTT library. This issue has been resolved in the newer version (2.2.0) by introducing an additional condition check that updates the Line 1794 in 238350a
I suggest updating to the latest version of the library ( v2.2.0) and testing it to confirm its functionality. If you still encounter any issues, please let us know. @ademyankov |
@Pooja-Toshniwal yes, I've just checked v2.2.0 and it works as excpected. Thank you for investigating the problem. |
It looks like there is a bug in the line
core_mqtt.c:1383
By default
PACKET_RX_TIMEOUT_MS
is 30 seconds butPING
message is sent every time the Loop function is invoked becausetimeElapsed
is always equal tonow
whenpContext->lastPacketRxTime
is0
The fix I did is this one but I am not sure how it might effect other parts of the code:
I haven't checked other conditions related to invoking
MQTT_Ping( pContext );
The text was updated successfully, but these errors were encountered: