diff --git a/src/main/java/io/lettuce/core/protocol/DefaultEndpoint.java b/src/main/java/io/lettuce/core/protocol/DefaultEndpoint.java index 07fbacf77a..4ec8640071 100644 --- a/src/main/java/io/lettuce/core/protocol/DefaultEndpoint.java +++ b/src/main/java/io/lettuce/core/protocol/DefaultEndpoint.java @@ -678,7 +678,7 @@ public void notifyDrainQueuedCommands(HasQueuedCommands queuedCommands) { cancelCommands("Connection closed", queuedCommands.drainQueue(), it -> it.completeExceptionally(lazy.get())); cancelCommands("Connection closed", drainCommands(), it -> it.completeExceptionally(lazy.get())); return; - } else if (reliability == Reliability.AT_MOST_ONCE && rejectCommandsWhileDisconnected) { + } else if (rejectCommandsWhileDisconnected) { Lazy lazy = Lazy.of(() -> new RedisException("Connection disconnected")); cancelCommands("Connection disconnected", queuedCommands.drainQueue(), it -> it.completeExceptionally(lazy.get()));