Skip to content

Keep alive interval issue #10

Closed
Closed
@amitguptaRean

Description

@amitguptaRean

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions