aqualink 1.7.0-beta1 → 1.7.0-beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/structures/Node.js +7 -1
- package/package.json +1 -1
package/build/structures/Node.js
CHANGED
|
@@ -243,9 +243,15 @@ class Node {
|
|
|
243
243
|
#reconnect() {
|
|
244
244
|
if (this.infiniteReconnects) {
|
|
245
245
|
this.aqua.emit("nodeReconnect", this, console.log("Experimental infinite reconnects enabled, will be trying non-stop..."));
|
|
246
|
-
|
|
246
|
+
setTimeout(() => {
|
|
247
|
+
this.connect();
|
|
248
|
+
}, 10000);
|
|
247
249
|
return;
|
|
248
250
|
}
|
|
251
|
+
|
|
252
|
+
if (this.connected) {
|
|
253
|
+
clearTimeout(this.reconnectTimeoutId);
|
|
254
|
+
}
|
|
249
255
|
if (++this.#reconnectAttempted >= this.reconnectTries) {
|
|
250
256
|
this.aqua.emit("nodeError", this, new Error(`Max reconnection attempts reached (${this.reconnectTries})`));
|
|
251
257
|
clearTimeout(this.reconnectTimeoutId);
|