Remove hotfix

This commit is contained in:
2023-03-17 15:06:59 +07:00
parent 51eeb8b762
commit 9d098a9289
-18
View File
@@ -282,24 +282,6 @@ export class DiscordMusicPlayerInstance {
}, 2000);
}
);
// Hotfix for VoiceConnection stuck in signalling state around a minute
// https://github.com/discordjs/discord.js/issues/9185
this.voiceConnection.on('stateChange', (oldState: VoiceConnectionState, newState: VoiceConnectionState) => {
const oldNetworking = Reflect.get(oldState, 'networking');
const newNetworking = Reflect.get(newState, 'networking');
const networkStateChangeHandler = (
oldNetworkState: VoiceConnectionState,
newNetworkState: VoiceConnectionState
) => {
const newUdp = Reflect.get(newNetworkState, 'udp');
clearInterval(newUdp?.keepAliveInterval);
};
oldNetworking?.off('stateChange', networkStateChangeHandler);
newNetworking?.on('stateChange', networkStateChangeHandler);
});
}
public async leaveVoiceChannel() {