订阅多线程下线程安全问题, 这儿针对这个bug改下, 后续可考虑升级jedis版本
@ -276,6 +276,11 @@ public class Connection implements Closeable {
return (List<Object>) readProtocolWithCheckingBroken();
}
@SuppressWarnings("unchecked")
public List<Object> getUnflushedObjectMultiBulkReply() {
public List<Object> getObjectMultiBulkReply() {
return getRawObjectMultiBulkReply();
@ -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);