We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c13877 commit 287d743Copy full SHA for 287d743
src/main/java/redis/clients/jedis/Pipeline.java
@@ -10,6 +10,7 @@
10
import redis.clients.jedis.exceptions.JedisDataException;
11
import redis.clients.jedis.graph.GraphCommandObjects;
12
import redis.clients.jedis.params.*;
13
+import redis.clients.jedis.util.IOUtils;
14
import redis.clients.jedis.util.KeyValue;
15
16
public class Pipeline extends PipelineBase implements DatabasePipelineCommands, Closeable {
@@ -46,10 +47,12 @@ public final <T> Response<T> appendCommand(CommandObject<T> commandObject) {
46
47
48
@Override
49
public void close() {
- sync();
50
-
51
- if (closeConnection) {
52
- connection.close();
+ try {
+ sync();
+ } finally {
53
+ if (closeConnection) {
54
+ IOUtils.closeQuietly(connection);
55
+ }
56
}
57
58
0 commit comments