Created
March 31, 2020 23:26
-
-
Save Randgalt/4e84f3f46fd19267f02f7fe57a06e51a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// change to checkSessionExpiration() | |
else if ( currentConnectionState == ConnectionState.LOST ) | |
{ | |
try | |
{ | |
if ( client.getZookeeperClient().isConnected() ) | |
{ | |
log.warn("ConnectionState is LOST but isConnected() is true. Resetting connection."); | |
client.getZookeeperClient().reset(); | |
} | |
else | |
{ | |
// give ConnectionState.checkTimeouts() a chance to run, reset ensemble providers, etc. | |
client.getZookeeperClient().getZooKeeper(); | |
} | |
} | |
catch ( Exception e ) | |
{ | |
log.error("Could not get ZooKeeper", e); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment