fix: client.destroy()

This commit is contained in:
Elysia
2023-02-28 13:18:09 +07:00
parent 47b420d289
commit ba22a5f550
5 changed files with 10 additions and 11 deletions

View File

@@ -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,