From c4e5d0b89b1d8833ce6f91f7b20a39ce269824e6 Mon Sep 17 00:00:00 2001 From: Jonathan Leibiusky Date: Wed, 4 Aug 2010 20:57:20 -0300 Subject: [PATCH] Treat any other type of reply as an error --- src/main/java/redis/clients/jedis/Protocol.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/redis/clients/jedis/Protocol.java b/src/main/java/redis/clients/jedis/Protocol.java index c678ec9..22f07ee 100644 --- a/src/main/java/redis/clients/jedis/Protocol.java +++ b/src/main/java/redis/clients/jedis/Protocol.java @@ -91,8 +91,10 @@ public class Protocol { return processInteger(is); } else if (b == DOLLAR_BYTE) { return processBulkReply(is); - } else { + } else if (b == PLUS_BYTE) { return processStatusCodeReply(is); + } else { + throw new JedisException("Unknown reply"); } } catch (IOException e) { throw new JedisException(e);