Redis response timeout handling improvement

2.x.x
Nikita Koksharov 6 years ago
parent 31dfbdbcf2
commit d79755e325

@ -938,7 +938,8 @@ public class CommandAsyncService implements CommandAsyncExecutor {
TimerTask timeoutTask = new TimerTask() { TimerTask timeoutTask = new TimerTask() {
@Override @Override
public void run(Timeout timeout) throws Exception { public void run(Timeout timeout) throws Exception {
if (details.getAttempt() < connectionManager.getConfig().getRetryAttempts()) { if (!details.getAttemptPromise().isDone()
&& details.getAttempt() < connectionManager.getConfig().getRetryAttempts()) {
if (!details.getAttemptPromise().cancel(false)) { if (!details.getAttemptPromise().cancel(false)) {
return; return;
} }

Loading…
Cancel
Save