Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

I think I found a fix for ConnectionResetError bug #1429

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aliwo
Copy link

@aliwo aliwo commented Oct 2, 2022

Hi, Thanks for the amazing library, I recently encountered ConnectionResetError bug and found #778 .
so I tried to make a fix.

#778 (comment)
I tested with above code (provided by Enchufa2), this change fixes the problem :)

What do these changes do?

now Redis.execute_command() catches ConnectionAbort and retry execution.

Are there changes in behavior for the user?

users do not have to except ConnectionError everytime they execute a command. Since RedisClient catches it for them.

Related issue number

#778

Checklist

I'm trying to add an unit test! please wait a moment :)
if this change looks good for you, I'll also add myself to CONTRIBUTORS.txt
let me know what you think!

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES/ folder
    • name it <issue_id>.<type> (e.g. 588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the PR
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example:
      Fix issue with non-ascii contents in doctest text files.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants