Closed
Description
We set the keep alive interval for both socket and mqtt connection to 30s
Reason - When a device looses WiFi we want a disconnected lifecycle event as quickly as possible
But we still see connection getting disconnected around 45s.
In previous AWS C SDK 3.1 - the SDK used to send periodic pings to keep the connection alive forever.
Question 1) Has this been removed in aws-iot-device-sdk-cpp-v2 ?
Question 2) Does our client code need to send periodic pings if we are not publishing anything within keep alive interval ?
if (!mqttConnection->Connect(clientId.c_str(), false, 30))
{
fprintf(stderr, "MQTT Connection failed with error %s\n", ErrorDebugString(mqttConnection->LastError()));
return FAILURE_CONNECT;
}
Metadata
Metadata
Assignees
Labels
No labels