Added missing autoReconnectBackoffTime

f_influxdb-line-protocol
Ruakij 3 years ago
parent 024305db43
commit 7f5e168fda

@ -21,6 +21,7 @@ class InfluxDbLineProtocolWriter extends net.Socket{
options.autoConnect ??= true; options.autoConnect ??= true;
options.timeout ??= 5000; options.timeout ??= 5000;
options.autoReconnect ??= true; options.autoReconnect ??= true;
options.autoReconnectBackoffTime ??= 3000;
this._options = options; this._options = options;
super.setKeepalive(true, 5000); super.setKeepalive(true, 5000);
@ -40,7 +41,8 @@ class InfluxDbLineProtocolWriter extends net.Socket{
if(!this._autoReconnectTimeout) if(!this._autoReconnectTimeout)
this._autoReconnectTimeout = setInterval(() => { this._autoReconnectTimeout = setInterval(() => {
this.connect(); this.connect();
}); },
this._options.autoReconnectBackoffTime);
}); });
} }

Loading…
Cancel
Save