Browse Source

Merge pull request #2738 in CORE/base-third from release/11.0 to feature/x

* commit 'a956120cd3bf743b9bd0ee6524033be54a37c66b':
  BI-88269 fix: 集群环境下FineBoundedBlockingQueue的相关问题, 订阅多线程下线程安全问题, 这儿针对这个bug改下, 后续可考虑升级jedis版本
research/11.0
superman 3 years ago
parent
commit
f0a86e63e4
  1. 5
      fine-jedis/src/main/java/com/fr/third/redis/clients/jedis/Connection.java
  2. 2
      fine-jedis/src/main/java/com/fr/third/redis/clients/jedis/JedisPubSub.java

5
fine-jedis/src/main/java/com/fr/third/redis/clients/jedis/Connection.java

@ -276,6 +276,11 @@ public class Connection implements Closeable {
return (List<Object>) readProtocolWithCheckingBroken();
}
@SuppressWarnings("unchecked")
public List<Object> getUnflushedObjectMultiBulkReply() {
return (List<Object>) readProtocolWithCheckingBroken();
}
public List<Object> getObjectMultiBulkReply() {
return getRawObjectMultiBulkReply();
}

2
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<Object> reply = client.getRawObjectMultiBulkReply();
List<Object> reply = client.getUnflushedObjectMultiBulkReply();
final Object firstObj = reply.get(0);
if (!(firstObj instanceof byte[])) {
throw new JedisException("Unknown message type: " + firstObj);

Loading…
Cancel
Save