You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "赵延 (Jira)" <ji...@apache.org> on 2021/01/18 07:40:00 UTC
[jira] [Created] (ZOOKEEPER-4182) Enhance message when packet's
length over limit.
赵延 created ZOOKEEPER-4182:
-----------------------------
Summary: 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: 赵延
{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)