RedisNodes ping results check optimization

Signed-off-by: blackstorm <inf2inf2@outlook.com>
pull/3235/head
blackstorm 4 years ago
parent 78c60bf65b
commit 5b938edd2f

@ -149,10 +149,12 @@ public class RedisNodes<N extends Node> implements NodesGroup<N> {
for (Entry<RedisConnection, RFuture<String>> entry : result.entrySet()) {
RFuture<String> f = entry.getValue();
f.awaitUninterruptibly();
if (!"PONG".equals(f.getNow())) {
String pong = f.getNow();
entry.getKey().closeAsync();
if (!"PONG".equals(pong)) {
res = false;
break;
}
entry.getKey().closeAsync();
}
// true and no futures were missed during client connection

Loading…
Cancel
Save