Skip to content

Conversation

dabroek
Copy link
Contributor

@dabroek dabroek commented Oct 14, 2022

Description

I want all of the Redis commands to inform me properly when the client has been disconnected. Currently, the promise returned by the multi.exec() command is not resolving after which execution hangs.

This pull requests makes sure the promise is rejected with a ClientClosedError exactly like #sendCommand is currently rejected as well when the client disconnects.


Checklist

  • Does npm test pass with this change (including linting)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

@dabroek dabroek changed the title Reject multi chain exec with client closed error after client disconnect Reject multi.exec() promise with ClientClosedError after client disconnect Oct 14, 2022
@leibale
Copy link
Contributor

leibale commented Oct 20, 2022

@dabroek sorry for the long delay, I was on vacation..

Nice catch! I'll merge and release it next week :)

@leibale leibale merged commit c413657 into redis:master Oct 26, 2022
florian-schunk pushed a commit to florian-schunk/node-redis that referenced this pull request Jun 18, 2025
…connect (redis#2293)

* Add reject multi chain on client disconnect assertion to client test suite

* Reject multi chain exec with client closed error after client disconnect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants