You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/01/18 07:53:00 UTC
[jira] [Updated] (ZOOKEEPER-4182) Enhance message when packet's
length over limit.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-4182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated ZOOKEEPER-4182:
--------------------------------------
Labels: pull-request-available (was: )
> 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: Major
> Labels: pull-request-available
> Time Spent: 10m
> 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)