Skip to content

Commit 172c8b6

Browse files
mastrolinuxmattiabertorello
authored andcommitted
Update keepalive vale
We need a shorter keepalive because the server setting is 60 second, we have seen 30 is good enough for most cases and makes a more reliable connection.
1 parent 5098d5e commit 172c8b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ArduinoIoTCloud.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ArduinoIoTCloudClass {
2626
static const int MQTT_BUFFER_SIZE = 256;
2727
static const int MAX_RETRIES = 5;
2828
static const int RECONNECTION_TIMEOUT = 2000;
29-
const mqttConnectionOptions mqttOpt = {120, false, 1000};
29+
const mqttConnectionOptions mqttOpt = {30, false, 1000};
3030

3131
int connect();
3232
bool disconnect();

0 commit comments

Comments
 (0)