[ https://issues.apache.org/jira/browse/ZOOKEEPER-4182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mate Szalay-Beko resolved ZOOKEEPER-4182. ----------------------------------------- Resolution: Duplicate > Enhance message when packet's length over limit. > ------------------------------------------------- > > Key: ZOOKEEPER-4182 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4182 > Project: ZooKeeper > Issue Type: Improvement > Components: java client > Affects Versions: 3.6.2 > Reporter: 赵延 > Priority: Minor > Labels: pull-request-available > Time Spent: 1h 40m > Remaining Estimate: 0h > > {code:java} > void readLength() throws IOException { > int len = incomingBuffer.getInt(); > if (len < 0 || len >= packetLen) { > throw new IOException("Packet len " + len + " is out of range!"); > } > incomingBuffer = ByteBuffer.allocate(len); > } > {code} > > The message can append `packetLen` info. -- This message was sent by Atlassian Jira (v8.3.4#803005)