attempt to handle ssl engine buffer overflow in IBM JVM
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1232 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
828fd11093
commit
8f14f20185
|
@ -681,7 +681,10 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint
|
|||
switch(_result.getStatus())
|
||||
{
|
||||
case BUFFER_OVERFLOW:
|
||||
throw new IllegalStateException(_result.toString());
|
||||
if (buffer.position()==0) // if this buffer can't have more space
|
||||
throw new IllegalStateException(_result.toString()+" "+buffer.limit());
|
||||
// return true is some bytes somewhere were moved about.
|
||||
return total_filled>0 ||_result.bytesConsumed()>0 || _result.bytesProduced()>0;
|
||||
|
||||
case BUFFER_UNDERFLOW:
|
||||
// Not enough data,
|
||||
|
@ -699,6 +702,9 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint
|
|||
|
||||
case CLOSED:
|
||||
_closing=true;
|
||||
// return true is some bytes somewhere were moved about.
|
||||
return total_filled>0 ||_result.bytesConsumed()>0 || _result.bytesProduced()>0;
|
||||
|
||||
case OK:
|
||||
// return true is some bytes somewhere were moved about.
|
||||
return total_filled>0 ||_result.bytesConsumed()>0 || _result.bytesProduced()>0;
|
||||
|
|
Loading…
Reference in New Issue