Fixed - NPE is thrown by RedisExecutor.handleError() method. #5641

pull/5644/head
Nikita Koksharov 1 year ago
parent ebc30517ac
commit 8713829242

@ -614,6 +614,10 @@ public class RedisExecutor<V, R> {
protected void handleError(CompletableFuture<RedisConnection> connectionFuture, Throwable cause) {
mainPromise.completeExceptionally(cause);
if (connectionFuture == null) {
return;
}
RedisClient client = connectionFuture.join().getRedisClient();
client.getConfig().getFailedNodeDetector().onCommandFailed(cause);
if (client.getConfig().getFailedNodeDetector().isNodeFailed()) {

@ -129,6 +129,10 @@ public class RedisQueuedBatchExecutor<V, R> extends BaseRedisBatchExecutor<V, R>
sentPromise.completeExceptionally(cause);
mainPromise.completeExceptionally(cause);
if (executed.compareAndSet(false, true)) {
if (connectionFuture == null) {
return;
}
RedisConnection c = getNow(connectionFuture);
if (c != null) {
c.forceFastReconnectAsync().whenComplete((res, e) -> {

Loading…
Cancel
Save