Closed
Description
Description
If I open a connection like this:
const conn = await createClient(options)
.on("connect", () => {
console.log("redis connect")
})
.on("ready", () => {
console.log("redis ready")
})
.on("end", () => {
console.log("redis end")
})
.on("error", async (error) => {
console.log("redis error", error)
})
.on("reconnecting", () => {
console.log("redis reconnecting")
})
.connect()
await conn.set('key', 'value');
I see this logs:
>> redis connect
>> redis ready
thank I can use the connection without any issue.
If I restart Redis to simulate a connection lost, I see an automatic reconnection with the following logs:
>> redis error SocketClosedUnexpectedlyError: Socket closed unexpectedly
>> redis reconnecting
>> redis connect
First of all, I never see ready and then if I try to use the connection await conn.set('key', 'value');
the call remain blocked indefinitely.
Node.js Version
v16.13.0 + v18.17.1
Redis Server Version
6.2.6
Node Redis Version
4.6.10
Platform
linux / docker
Logs
No response