From 7f5e168fda89a711ee6314df467feb4e4cec8289 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Thu, 9 Dec 2021 17:12:35 +0100 Subject: [PATCH] Added missing autoReconnectBackoffTime --- src/streamHandler/InfluxDbLineProtocolWriter.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/streamHandler/InfluxDbLineProtocolWriter.js b/src/streamHandler/InfluxDbLineProtocolWriter.js index 1aa4449..f0c9a1f 100644 --- a/src/streamHandler/InfluxDbLineProtocolWriter.js +++ b/src/streamHandler/InfluxDbLineProtocolWriter.js @@ -21,6 +21,7 @@ class InfluxDbLineProtocolWriter extends net.Socket{ options.autoConnect ??= true; options.timeout ??= 5000; options.autoReconnect ??= true; + options.autoReconnectBackoffTime ??= 3000; this._options = options; super.setKeepalive(true, 5000); @@ -40,7 +41,8 @@ class InfluxDbLineProtocolWriter extends net.Socket{ if(!this._autoReconnectTimeout) this._autoReconnectTimeout = setInterval(() => { this.connect(); - }); + }, + this._options.autoReconnectBackoffTime); }); }