Skip to content
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

fix: Redis 4 does not reconnect after unhandled error in RedisPubSub.js #9571

Open
wants to merge 3 commits into
base: alpha
Choose a base branch
from

Conversation

ChrisGrant
Copy link

Pull Request

PR #8706 added empty handlers to src/Adapters/Cache/RedisCacheAdapter.js.

It did not add the empty handlers to RedisPubSub.js, meaning that this issue was closed but not completely fixed when RedisPubSub.js is in use.

Issue

Closes: #8705

Approach

Adds mostly empty event handlers to the Redis client, which is now required for Redis 4.

NB: Please let me know if it would be better to open a new issue for this rather than referring to the original (closed) issue, but I do believe that it is the same issue that hasn't been fixed in a certain area. I've tested the fix in my production environment and it does seem to fix the problem I have been having for a while now.

Copy link

Thanks for opening this pull request!

@mtrezza
Copy link
Member

mtrezza commented Jan 26, 2025

Is it possible to add a test case?

@ChrisGrant
Copy link
Author

@mtrezza I'm not sure how you would add a test case for this fix as it does seem to be largely dependent on the redis connecting timing out and I'm not sure how you'd replicate this during testing. There was no test case on the previous PR (#8706) so I presumed this one wouldn't require a test case either.

Happy to be told that I'm wrong though if you can offer some advice / a starting point on where I could add one!

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.

Latest version of Redis won't automatically reconnect without error handling
2 participants