Skip to content

Commit

Permalink
Randomise reconnect period within a range
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve-Mcl committed Sep 9, 2024
1 parent 8ba435f commit cd66f5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nodes/project-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ module.exports = function (RED) {
const defaultOptions = {
protocolVersion: 5,
clean: false,
reconnectPeriod: RED.settings.mqttReconnectTime || 5000,
reconnectPeriod: RED.settings.mqttReconnectTime || crypto.randomInt(3000, 7000),
properties: {
// Allow the broker to keep the session alive for 2 minutes after
// a disconnect. This ensures short-connectivity blips do not lead to
Expand Down

0 comments on commit cd66f5b

Please sign in to comment.