Skip to content

fix(handshake): ignore errors on client.setinfo #2969

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

nkaradzhov
Copy link
Collaborator

As per the documentation (https://redis.io/docs/latest/commands/client-setinfo):

Client libraries are expected to pipeline this command after authentication on all connections and ignore failures since they could be connected to an older version that doesn't support them.

Turns out different versions of redis server return different errors, so its better to catch all.

fixes #2968

Description

Describe your pull request here


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

As per the documentation (https://redis.io/docs/latest/commands/client-setinfo):

Client libraries are expected to pipeline this command after authentication on all connections and ignore failures since they could be connected to an older version that doesn't support them.

Turns out different versions of redis server return different errors, so its better to catch all.

fixes redis#2968
Copy link
Member

@bobymicroby bobymicroby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nkaradzhov nkaradzhov merged commit 9ea260f into redis:master May 21, 2025
11 checks passed
@nkaradzhov nkaradzhov deleted the broken-compatibility-with-older-servers branch May 21, 2025 08:38
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.

Version 5.1.0 of the library breaks compatibility with 4.0 of the server
2 participants