Fixed - releaseConnection may not execute correctly. simplified code.

Signed-off-by: seakider <seakider@gmail.com>
pull/5883/head
seakider 10 months ago
parent ef97459b64
commit df46410df4

@ -99,11 +99,8 @@ public class RedisQueuedBatchExecutor<V, R> extends BaseRedisBatchExecutor<V, R>
if (RedisCommands.EXEC.getName().equals(command.getName()) if (RedisCommands.EXEC.getName().equals(command.getName())
|| RedisCommands.DISCARD.getName().equals(command.getName())) { || RedisCommands.DISCARD.getName().equals(command.getName())) {
if (attempt < attempts if (attempt < attempts
&& attemptPromise.isCompletedExceptionally()) { && attemptPromise.isCancelled()) {
Throwable cause = cause(attemptPromise); return;
if (cause instanceof CancellationException) {
return;
}
} }
super.releaseConnection(attemptPromise, connectionFuture); super.releaseConnection(attemptPromise, connectionFuture);

Loading…
Cancel
Save