You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
* fixes #2524 * `clearTimeout` in `disconnect` too --------- Co-authored-by: Leibale Eidelman <me@leibale.com>
This commit is contained in:
@@ -683,6 +683,7 @@ export default class RedisClient<
|
||||
|
||||
QUIT(): Promise<string> {
|
||||
return this.#socket.quit(async () => {
|
||||
if (this.#pingTimer) clearTimeout(this.#pingTimer);
|
||||
const quitPromise = this.#queue.addCommand<string>(['QUIT']);
|
||||
this.#tick();
|
||||
const [reply] = await Promise.all([
|
||||
@@ -804,6 +805,7 @@ export default class RedisClient<
|
||||
}
|
||||
|
||||
async disconnect(): Promise<void> {
|
||||
if (this.#pingTimer) clearTimeout(this.#pingTimer);
|
||||
this.#queue.flushAll(new DisconnectsClientError());
|
||||
this.#socket.disconnect();
|
||||
await this.#destroyIsolationPool();
|
||||
|
Reference in New Issue
Block a user