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

Make sure Redis.send(..) methods are tail recursive #302

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

Commits on Jan 25, 2023

  1. Make sure Redis.send(..) methods are tail recursive

    We need to do that cause if we have a faulty Redis server that has
    issues with connections the reconnect-on-error functionality of those
    methods can result in `StackOverflowError`.
    
    We had to create a private method for each `send(..)` method cause simply
    adding `@tailrec` would produce the following compiler error: "could not
    optimize @tailrec annotated method send: it is neither private nor final
    so can be overridden". We also opted for adding private methods instead
    of defining them inside each method in order to make fewer changes and
    better preserve the git history.
    sptz45 committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    cb959ca View commit details
    Browse the repository at this point in the history