From d75d9901df02f6f9180cc40faad02a7c4ae7ba9b Mon Sep 17 00:00:00 2001 From: checky Date: Tue, 9 Mar 2021 14:30:24 +0900 Subject: [PATCH] Activate MultiOutput before sending the actual MULTI command #1625 Original pull request: #1651. --- .../io/lettuce/core/StatefulRedisConnectionImpl.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/io/lettuce/core/StatefulRedisConnectionImpl.java b/src/main/java/io/lettuce/core/StatefulRedisConnectionImpl.java index 66bb2ccccd..4f599f638f 100644 --- a/src/main/java/io/lettuce/core/StatefulRedisConnectionImpl.java +++ b/src/main/java/io/lettuce/core/StatefulRedisConnectionImpl.java @@ -158,13 +158,11 @@ public RedisCommand dispatch(RedisCommand command) { RedisCommand toSend = preProcessCommand(command); - try { - return super.dispatch(toSend); - } finally { - if (command.getType().name().equals(MULTI.name())) { - multi = (multi == null ? new MultiOutput<>(codec) : multi); - } + if (command.getType().name().equals(MULTI.name())) { + multi = (multi == null ? new MultiOutput<>(codec) : multi); } + + return super.dispatch(toSend); } @Override