You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that when a timeout occurs, node-redis will reset the state of the subscribed client. After reconnecting, the client is no longer subscribed!
This happens in the reset() method of node_modules/@redis/client/dist/lib/client/pub-sub.js.
While I can temporarily fix this by prolonging the connectTimeout, I think it would be better to fix it in the code itself.
Node.js Version
v20.13.1
Redis Server Version
6.0.15
Node Redis Version
4.7.0
Platform
linux
Logs
TypeError: Cannot destructure property 'resolve' of '__classPrivateFieldGet(...).shift(...)' as it is undefined.
at Object.onReply (/node_modules/@redis/client/dist/lib/client/commands-queue.js:64:25)
at RESP2Decoder.write (/node_modules/@redis/client/dist/lib/client/RESP2/decoder.js:119:26)
at RedisCommandsQueue.onReplyChunk (/node_modules/@redis/client/dist/lib/client/commands-queue.js:156:72)
at RedisSocket.<anonymous> (/node_modules/@redis/client/dist/lib/client/index.js:420:84)
at RedisSocket.emit (node:events:519:28)
at RedisSocket.emit (node:domain:488:12)
at Socket.<anonymous> (/node_modules/@redis/client/dist/lib/client/socket.js:201:42)
at Socket.emit (node:events:519:28)
at Socket.emit (node:domain:488:12)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Socket.Readable.push (node:internal/streams/readable:390:5)
at TCP.onStreamRead (node:internal/stream_base_commons:191:23)
The text was updated successfully, but these errors were encountered:
Description
Steps to Reproduction
Code
Solution
I found that when a timeout occurs, node-redis will reset the state of the subscribed client. After reconnecting, the client is no longer subscribed!
This happens in the
reset()
method ofnode_modules/@redis/client/dist/lib/client/pub-sub.js
.While I can temporarily fix this by prolonging the connectTimeout, I think it would be better to fix it in the code itself.
Node.js Version
v20.13.1
Redis Server Version
6.0.15
Node Redis Version
4.7.0
Platform
linux
Logs
The text was updated successfully, but these errors were encountered: