refactoring

pull/5315/head
Nikita Koksharov 1 year ago
parent c802abb446
commit 4e7724eddf

@ -84,10 +84,7 @@ public class PingConnectionHandler extends ChannelInboundHandlerAdapter {
Throwable cause = cause(future);
if (!(cause instanceof RedisLoadingException
|| cause instanceof RedisTryAgainException
|| cause instanceof RedisClusterDownException
|| cause instanceof RedisBusyException)) {
if (!(cause instanceof RedisRetryException)) {
if (!future.isCancelled()) {
log.error("Unable to send PING command over channel: {}", ctx.channel(), cause);
}

@ -161,10 +161,10 @@ public class RedisCommonBatchExecutor extends RedisExecutor<Object, Void> {
protected void handleResult(CompletableFuture<Void> attemptPromise, CompletableFuture<RedisConnection> connectionFuture) throws ReflectiveOperationException {
if (attemptPromise.isDone() && !attemptPromise.isCompletedExceptionally()) {
if (slots.decrementAndGet() == 0) {
mainPromise.complete(null);
handleSuccess(mainPromise, connectionFuture, null);
}
} else {
mainPromise.completeExceptionally(cause(attemptPromise));
handleError(connectionFuture, cause(attemptPromise));
}
}

Loading…
Cancel
Save