Skip to content

Reject multi.exec() promise with ClientClosedError after client disconnect #2293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

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
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