From 753025eb3bedbe83486fc36d276f934f901283e0 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Tue, 14 Feb 2012 21:51:33 +0000
Subject: [PATCH] Fix OPENDJ-420: Rare SSLExceptions while handling LDAPS connections and big LDAP searches
---
opends/src/server/org/opends/server/extensions/TLSByteChannel.java | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/opends/src/server/org/opends/server/extensions/TLSByteChannel.java b/opends/src/server/org/opends/server/extensions/TLSByteChannel.java
index 9ddb118..9914582 100644
--- a/opends/src/server/org/opends/server/extensions/TLSByteChannel.java
+++ b/opends/src/server/org/opends/server/extensions/TLSByteChannel.java
@@ -131,8 +131,7 @@
{
synchronized (readLock)
{
- // Repeat until there is some unwrapped data available or all available
- // data has been read from the underlying socket.
+ // Only read and unwrap new data if needed.
if (!recvUnwrappedBuffer.hasRemaining())
{
final int read = doRecvAndUnwrap();
@@ -147,7 +146,7 @@
final int startPos = unwrappedData.position();
if (recvUnwrappedBuffer.remaining() > unwrappedData.remaining())
{
- // Unwrapped data does not fit in client buffer so copy one by at a
+ // Unwrapped data does not fit in client buffer so copy one byte at a
// time: it's annoying that there is no easy way to do this with
// ByteBuffers.
while (unwrappedData.hasRemaining())
--
Gitblit v1.10.0