Fix Jedis and RJC continuing to use pipeline after closed

DATAREDIS-162, DATAREDIS-163
This commit is contained in:
Jennifer Hickey
2013-04-02 15:49:56 -07:00
parent c5c3a81f42
commit d34cf27996
7 changed files with 27 additions and 75 deletions

View File

@@ -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++) {

View File

@@ -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) {