XComp commented on code in PR #430:
URL: https://github.com/apache/curator/pull/430#discussion_r970793303
##########
curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java:
##########
@@ -667,9 +670,9 @@ protected void handleStateChange(ConnectionState newState)
{
try
{
- if (
client.getConnectionStateErrorPolicy().isErrorState(ConnectionState.SUSPENDED)
|| !hasLeadership.get() )
+ if (
client.getConnectionStateErrorPolicy().isErrorState(ConnectionState.SUSPENDED) )
{
- reset();
+ getChildren();
Review Comment:
Ok, after revisiting your response in [that thread earlier in this
PR](https://github.com/apache/curator/pull/430#discussion_r967852427), I notice
again that `getChildren` is the proper way of doing it:
* either the corresponding child node is still around: Then we would pick up
the leadership again.
* if it's not around, `reset()` will be called, anyway
Sorry for the confusion. ...to many threads -.-
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]