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); }); }