Closed twlawrenceko closed 2 years ago
Hello, Apologies for delay in response. To keep the connection alive we need to send PINGREQ at regular intervals defined by keep alive timeout. To send keep alive packets you can either call
If application is idle and have no other processing to do, I would suggest calling MQTT_ProcessLoop with a timeout parameter so that it can handle incoming packets as well.
Hope this clarifies your question. Please feel free to open an issue if you have further questions.
Hello,
We are using the example code from here and with the removal of returnStatus = DisconnectMqttSession(); we expect the PINGREQ should continue to avoid client disconnect due to
MQTT_KEEP_ALIVE_TIMEOUT
.Here is the activity we see in AWS IoT:
Thank you