From 45c016a99dc19788bfeb8aafebfab517da645c28 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Tue, 12 Jan 2021 15:09:08 +0100 Subject: [PATCH] set 60 default keepalive --- CHANGES_NEXT_RELEASE | 1 + config.js | 4 ++-- docs/installationguide.md | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index e69de29b..9daceb7d 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -0,0 +1 @@ +Fix: Set 60 seconds for default mqtt keepalive option (#370) diff --git a/config.js b/config.js index 097c8c59..2f93d447 100644 --- a/config.js +++ b/config.js @@ -92,9 +92,9 @@ config.mqtt = { retryTime: 5, /** - * Time to keep connection open between client and MQTT broker (default is 0 seconds) + * Time to keep connection open between client and MQTT broker (default is 60 seconds) */ - keepalive: 0, + keepalive: 60, /** * Whether to use slashes at the beginning of topic when sending or not diff --git a/docs/installationguide.md b/docs/installationguide.md index dd1da908..5c192304 100644 --- a/docs/installationguide.md +++ b/docs/installationguide.md @@ -182,8 +182,8 @@ IoT Agent. The following attributes are accepted: - **retain**: retain flag (default is `false`). - **retries**: Number of MQTT connection error retries (default is 5). - **retryTime**: Time between MQTT connection retries (default is 5 seconds). -- **keepalive**: Time to keep connection open between client and MQTT broker (default is 0 seconds). If you experience - disconnnection problems using 0 (as the one described in +- **keepalive**: Time to keep connection open between client and MQTT broker (default is 60 seconds). If you + experience disconnnection problems using 0 (as the one described in [this case](https://github.com/telefonicaid/iotagent-json/issues/455)) a value greater than 0 is recommended. - **rejectUnauthorized** whether to reject any connection which is not authorized with the list of supplied CAs. This option only has an effect when using `mqtts`, `tls` or `wss` protocols (default is `true`). Set to `false` if using