Skip to content

Commit

Permalink
Merge branch 'master' into emb-examples
Browse files Browse the repository at this point in the history
  • Loading branch information
uglide authored Jun 18, 2024
2 parents 79d7ec7 + db826a6 commit 4035a46
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/java/redis/clients/jedis/Pipeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import redis.clients.jedis.exceptions.JedisDataException;
import redis.clients.jedis.graph.GraphCommandObjects;
import redis.clients.jedis.params.*;
import redis.clients.jedis.util.IOUtils;
import redis.clients.jedis.util.KeyValue;

public class Pipeline extends PipelineBase implements DatabasePipelineCommands, Closeable {
Expand Down Expand Up @@ -46,10 +47,12 @@ public final <T> Response<T> appendCommand(CommandObject<T> commandObject) {

@Override
public void close() {
sync();

if (closeConnection) {
connection.close();
try {
sync();
} finally {
if (closeConnection) {
IOUtils.closeQuietly(connection);
}
}
}

Expand Down

0 comments on commit 4035a46

Please sign in to comment.