Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-4182

Enhance message when packet's length over limit.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.6.2
    • Fix Version/s: None
    • Component/s: java client

      Description

      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);
      }
      

       

      The message can append `packetLen` info.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                horizonzy 赵延
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m