Skip to content

Commit e609b4e

Browse files
committed
Apply patch to fix legacy mode ping interval
1 parent fb816b9 commit e609b4e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/client/lib/client/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ export default class RedisClient<
362362
this.#pingTimer = setTimeout(() => {
363363
if (!this.#socket.isReady) return;
364364

365-
(this as unknown as RedisClientType<M, F, S>).ping()
365+
const v4Client = (this.#options?.legacyMode ? this.v4 : this);
366+
(v4Client as unknown as RedisClientType<M, F, S>).ping()
366367
.then(reply => this.emit('ping-interval', reply))
367368
.catch(err => this.emit('error', err))
368369
.finally(() => this.#setPingTimer());

0 commit comments

Comments
 (0)