Fix Jedis and RJC continuing to use pipeline after closed
DATAREDIS-162, DATAREDIS-163
This commit is contained in:
@@ -256,6 +256,7 @@ public class JedisConnection implements RedisConnection {
|
||||
public List<Object> closePipeline() {
|
||||
if (pipeline != null) {
|
||||
List<Object> execute = pipeline.syncAndReturnAll();
|
||||
pipeline = null;
|
||||
if (execute != null && !execute.isEmpty()) {
|
||||
Exception cause = null;
|
||||
for (int i = 0; i < execute.size(); i++) {
|
||||
|
||||
@@ -142,6 +142,7 @@ public class RjcConnection implements RedisConnection {
|
||||
|
||||
public List<Object> closePipeline() {
|
||||
if (pipeline != null) {
|
||||
pipeline = null;
|
||||
try {
|
||||
return RjcUtils.maybeConvert(client.getAll());
|
||||
} catch (Exception ex) {
|
||||
|
||||
Reference in New Issue
Block a user