-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Introduce and extend Config pattern (II/2) #2363
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
Conversation
| if (socketParamModified) { // this is only for backward compatibility | ||
| try { | ||
| disconnect(); | ||
| } catch(Exception e) { | ||
| // swallow | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need disconnect() before connect().
i also think we should not swallow any exception, we need logger.error it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i also think we should not swallow any exception, we need logger.error it.
acknowledged
why do we need disconnect() before connect().
In current Jedis implementation, it is possible for users to change connection params after constructor. This block of code is present to support those implementations by recreating the connections if the params are changed.
|
@yangbodong22011 Let's continue at #2368 |
An alternate implementation of #2352.
This approach copies the configuration parameters instead of saving the object reference.