You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/content/docs/extra/version-log.mdx
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,25 @@ Logs about the changed features.
9
9
10
10
---
11
11
12
+
## **Version 2.7.2**
13
+
14
+
Make the node auto-reconnection more solid by a reconnection queue, so we can trigger reconnection tries much easier.
15
+
You can check the current state of reconnection by accessing **`node.reconnectionState`** (`"IDLE"` / `"RECONNECTING"` / `"PENDING"` / `"DESTROYING"`)
16
+
Alterantivly you can use the getter property to check wether it's pending to reconnect or reconnecting: **`node.isNodeReconnecting`** (easier to use)
17
+
18
+
Huge thanks to **[@ductridev](https://github.com/ductridev)** who introduced this change in: [Pull #154](https://github.com/Tomato6966/lavalink-client/pull/154)
19
+
Enhances the resilience of the LavalinkNode by introducing automatic reconnection attempts on WebSocket errors instead of only emitting error events. The implementation adds a state machine using a new ReconnectionState enum to prevent duplicate reconnection attempts.
20
+
21
+
Key Changes:
22
+
23
+
- Added ReconnectionState enum to track reconnection status (IDLE, RECONNECTING, PENDING)
24
+
- Refactored reconnect() method to use state guards preventing concurrent reconnection attempts
25
+
- Modified error() handler to trigger reconnection directly instead of emitting error events
26
+
- there is now a new getter: `node.reconnectionAttemptCount` (which allows you to get the count of the current reconnection attempts, considering the new option `node.options.retryTimespan`)
27
+
- Before the `node.reconnectAttempts` was a number-counter. Now it's just an array of Date-Times, to be able to allow Retrys per a timespan (e.g. you can have 20 retries every hour.) - setup able through `node.options.retryTimespan`, on default it's -1. so it behaves as before.
28
+
- FIX: Now instead of counting from "1 retry up" it counts from 0 up, means if you set `node.retryAmount` to "1" it actually tries 1 time to retry, and not 0. (issue before)
0 commit comments