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.
@@ -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
- this.connect();
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aqualink",
3
- "version": "1.7.0-beta1",
3
+ "version": "1.7.0-beta2",
4
4
  "description": "An Lavalink wrapper, focused in speed, performance, and features, Based in Riffy!",
5
5
  "main": "build/index.js",
6
6
  "scripts": {