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: add timeout for redis read and write ops. #478

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

chriswk
Copy link
Member

@chriswk chriswk commented Jul 11, 2024

Previously, if you gave us a redis url that was valid, but used the wrong protocol (so rediss when connecting to insecure, or redis when connecting to secure), operations against Redis got stuck. This PR adds a timeout setting (setting it to default of 2000 ms, but configurable).

This does add time when url is completely invalid (i.e. there's nothing listening), but it prevents the client from getting stuck indefinitely if something answers, but redis can't get an answer.

@chriswk chriswk requested review from nunogois and sighphyre July 11, 2024 10:30
@chriswk chriswk self-assigned this Jul 11, 2024
Copy link

github-actions bot commented Jul 11, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

Previously, if you gave us a redis url that was valid, but used the
wrong protocol (so rediss when connecting to insecure, or redis when
connecting to secure), operations against Redis got stuck. This PR adds
a timeout setting (setting it to default of 2000 ms, but configurable).

This does add time when url is completely invalid (i.e. there's nothing
listening), but it prevents the client from getting stuck indefinitely
if something answers, but redis can't get an answer.
@chriswk chriswk force-pushed the fix/addTimoutForRedisConnections branch from 16c967a to 216ef3d Compare July 11, 2024 10:33
Copy link
Contributor

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

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

LG!

@chriswk chriswk merged commit b89841f into main Jul 11, 2024
10 checks passed
@chriswk chriswk deleted the fix/addTimoutForRedisConnections branch July 11, 2024 14:53
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