Skip to content

Commit

Permalink
Activate MultiOutput before sending the actual MULTI command #1625
Browse files Browse the repository at this point in the history
Original pull request: #1651.
  • Loading branch information
checky authored and mp911de committed Mar 11, 2021
1 parent bc79069 commit 00c4f5d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/main/java/io/lettuce/core/StatefulRedisConnectionImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,11 @@ public <T> RedisCommand<K, V, T> dispatch(RedisCommand<K, V, T> command) {

RedisCommand<K, V, T> 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
Expand Down

0 comments on commit 00c4f5d

Please sign in to comment.