Skip to content

Commit

Permalink
set 60 default keepalive
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed Jan 12, 2021
1 parent 329cfeb commit 45c016a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix: Set 60 seconds for default mqtt keepalive option (#370)
4 changes: 2 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/installationguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 45c016a

Please sign in to comment.