fix: client.destroy()
This commit is contained in:
@@ -280,7 +280,7 @@ new DiscordAuthWebsocket({
|
||||
_heartbeatAck() {
|
||||
setTimeout(() => {
|
||||
this._heartbeat();
|
||||
}, this.heartbeatInterval);
|
||||
}, this.heartbeatInterval).unref();
|
||||
}
|
||||
_ready(data) {
|
||||
this._logger('debug', 'Attempting server handshake...');
|
||||
|
@@ -22,7 +22,7 @@ module.exports = class ProcessServer {
|
||||
this.scan = this.scan.bind(this);
|
||||
|
||||
this.scan();
|
||||
setInterval(this.scan, 5000);
|
||||
setInterval(this.scan, 5000).unref();
|
||||
|
||||
if (this.debug) log('started');
|
||||
}
|
||||
|
@@ -134,7 +134,7 @@ const socketIsAvailable = async socket => {
|
||||
// eslint-disable-next-line prefer-promise-reject-errors
|
||||
new Promise((res, rej) => socket.on('pong', () => rej('socket ponged'))), // Ponged
|
||||
// eslint-disable-next-line prefer-promise-reject-errors
|
||||
new Promise((res, rej) => setTimeout(() => rej('timed out'), 1000)), // Timed out
|
||||
new Promise((res, rej) => setTimeout(() => rej('timed out'), 1000).unref()), // Timed out
|
||||
]).then(
|
||||
() => true,
|
||||
e => e,
|
||||
|
Reference in New Issue
Block a user