refactor(*): us timer.unref()
This commit is contained in:
parent
9671d60ac6
commit
e66ef442e2
3 changed files with 3 additions and 3 deletions
|
@ -117,7 +117,7 @@ class Player extends EventEmitter<PlayerEvents> {
|
|||
if (!this.queues.has(queue.guild.id)) return;
|
||||
queue.destroy();
|
||||
this.emit("channelEmpty", queue);
|
||||
}, queue.options.leaveOnEmptyCooldown || 0);
|
||||
}, queue.options.leaveOnEmptyCooldown || 0).unref();
|
||||
queue._cooldownsTimeout.set(`empty_${oldState.guild.id}`, timeout);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -657,7 +657,7 @@ class Queue<T = unknown> {
|
|||
this.connection.playStream(resource).then(() => {
|
||||
this.setVolume(this.options.initialVolume);
|
||||
});
|
||||
}, this.#getBufferingTimeout());
|
||||
}, this.#getBufferingTimeout()).unref();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -91,7 +91,7 @@ class Util {
|
|||
* @returns {Promise<unknown>}
|
||||
*/
|
||||
static wait(time: number) {
|
||||
return new Promise((r) => setTimeout(r, time));
|
||||
return new Promise((r) => setTimeout(r, time).unref());
|
||||
}
|
||||
|
||||
static noop() {} // eslint-disable-line @typescript-eslint/no-empty-function
|
||||
|
|
Loading…
Reference in a new issue