Uploaded image for project: 'XNIO'
  1. XNIO
  2. XNIO-398

JsseSslConduitEngine.isDataAvailable tests for readBuffer.hasRemaining()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.8.6.Final
    • None
    • None
    • None

      The correct would be checking for a position > 0, because the remaining bytes always show the remaining space for storing unwrapped data, and the bytes in [0, position[ are always the bytes that have been unwrapped.

      Notice that the only moment this condition is not true is when the buffer is flipped to copy unwrapped data (see copyUnwrappedData), but given that happens inside a lock, and that the buffer is compacted right after that, we can check safely for position>0 in hasRemainingData.

            Unassigned Unassigned
            flaviarnn Flavia Rainone
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: