Merge pull request #3235 from blackstorm/nodes-ping-check

RedisNodes ping results check optimization
pull/3292/head
Nikita Koksharov 4 years ago committed by GitHub
commit fb23ee6ad1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save