From cbd995ac760b97eb0aadfe716324cd223cd28cbe Mon Sep 17 00:00:00 2001 From: "Dylan.Liu" Date: Tue, 29 Jun 2021 14:36:13 +0800 Subject: [PATCH] =?UTF-8?q?BI-88269=20fix:=20=E9=9B=86=E7=BE=A4=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E4=B8=8BFineBoundedBlockingQueue=E7=9A=84=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=97=AE=E9=A2=98,=20=E8=AE=A2=E9=98=85=E5=A4=9A?= =?UTF-8?q?=E7=BA=BF=E7=A8=8B=E4=B8=8B=E7=BA=BF=E7=A8=8B=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98,=20=E8=BF=99=E5=84=BF=E9=92=88=E5=AF=B9?= =?UTF-8?q?=E8=BF=99=E4=B8=AAbug=E6=94=B9=E4=B8=8B,=20=E5=90=8E=E7=BB=AD?= =?UTF-8?q?=E5=8F=AF=E8=80=83=E8=99=91=E5=8D=87=E7=BA=A7jedis=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/third/redis/clients/jedis/Connection.java | 5 +++++ .../java/com/fr/third/redis/clients/jedis/JedisPubSub.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fine-jedis/src/main/java/com/fr/third/redis/clients/jedis/Connection.java b/fine-jedis/src/main/java/com/fr/third/redis/clients/jedis/Connection.java index fef773ccc..36a0b3198 100644 --- a/fine-jedis/src/main/java/com/fr/third/redis/clients/jedis/Connection.java +++ b/fine-jedis/src/main/java/com/fr/third/redis/clients/jedis/Connection.java @@ -276,6 +276,11 @@ public class Connection implements Closeable { return (List) readProtocolWithCheckingBroken(); } + @SuppressWarnings("unchecked") + public List getUnflushedObjectMultiBulkReply() { + return (List) readProtocolWithCheckingBroken(); + } + public List getObjectMultiBulkReply() { return getRawObjectMultiBulkReply(); } diff --git a/fine-jedis/src/main/java/com/fr/third/redis/clients/jedis/JedisPubSub.java b/fine-jedis/src/main/java/com/fr/third/redis/clients/jedis/JedisPubSub.java index ef2973500..dd23d2f69 100644 --- a/fine-jedis/src/main/java/com/fr/third/redis/clients/jedis/JedisPubSub.java +++ b/fine-jedis/src/main/java/com/fr/third/redis/clients/jedis/JedisPubSub.java @@ -128,7 +128,7 @@ public abstract class JedisPubSub { private void process(Client client) { do { - List reply = client.getRawObjectMultiBulkReply(); + List reply = client.getUnflushedObjectMultiBulkReply(); final Object firstObj = reply.get(0); if (!(firstObj instanceof byte[])) { throw new JedisException("Unknown message type: " + firstObj);