From dd43cf9437e3ac19b4591e5bfeacc25b5e1dce77 Mon Sep 17 00:00:00 2001 From: horizonzy <1060026287@qq.com> Date: Mon, 18 Jan 2021 15:50:26 +0800 Subject: [PATCH] Enhance message when packet's length over limit. --- .../src/main/java/org/apache/zookeeper/ClientCnxnSocket.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocket.java b/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocket.java index 315d81feb8b..6141d51e855 100644 --- a/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocket.java +++ b/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocket.java @@ -118,7 +118,7 @@ void updateLastSendAndHeard() { void readLength() throws IOException { int len = incomingBuffer.getInt(); if (len < 0 || len >= packetLen) { - throw new IOException("Packet len " + len + " is out of range!"); + throw new IOException("Packet len " + len + " is out of range " + packetLen + "!"); } incomingBuffer = ByteBuffer.allocate(len); }