mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
voice: fix heartbeat issue (#2443)
This commit is contained in:
@@ -232,7 +232,7 @@ class VoiceWebSocket extends EventEmitter {
|
||||
* Sends a heartbeat packet.
|
||||
*/
|
||||
sendHeartbeat() {
|
||||
this.sendPacket({ op: VoiceOPCodes.HEARTBEAT, d: null }).catch(() => {
|
||||
this.sendPacket({ op: VoiceOPCodes.HEARTBEAT, d: Math.floor(Math.random() * 10e10) }).catch(() => {
|
||||
this.emit('warn', 'Tried to send heartbeat, but connection is not open');
|
||||
this.clearHeartbeat();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user