We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c2dcc1 commit 389e431Copy full SHA for 389e431
src/structures/Node.ts
@@ -1137,11 +1137,11 @@ export class LavalinkNode {
1137
// every x ms send a ping to lavalink to retrieve a pong later on
1138
this.heartBeatInterval = setInterval(() => {
1139
if (!this.socket) return console.error("Node-Heartbeat-Interval - Socket not available - maybe reconnecting?");
1140
- if (!this.isAlive) this.close(500, "Node-Heartbeat-Timeout");
+ if (!this.isAlive) return this.close(500, "Node-Heartbeat-Timeout");
1141
1142
this.isAlive = false;
1143
this.heartBeatPingTimestamp = performance.now();
1144
- this.socket.ping();
+ this.socket?.ping?.();
1145
}, this.options.heartBeatInterval || 30_000);
1146
}
1147
0 commit comments