Issue #4217 - Fixing OVERFLOW case to allow flush()
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
c980e3dd34
commit
f7ab02a5d1
|
@ -879,6 +879,9 @@ public class SslConnection extends AbstractConnection
|
|||
}
|
||||
return allConsumed;
|
||||
|
||||
case BUFFER_UNDERFLOW:
|
||||
throw new IllegalStateException();
|
||||
|
||||
case BUFFER_OVERFLOW:
|
||||
{
|
||||
// It's possible that SSLSession.packetBufferSize has been expanded
|
||||
|
@ -892,12 +895,13 @@ public class SslConnection extends AbstractConnection
|
|||
releaseEncryptedOutputBuffer();
|
||||
continue;
|
||||
}
|
||||
throw new IllegalStateException("Unexpected wrap result " + wrapResultStatus);
|
||||
if (BufferUtil.isEmpty(_encryptedOutput))
|
||||
{
|
||||
throw new IllegalStateException("Unexpected wrap result " + wrapResultStatus);
|
||||
}
|
||||
// fall-through default case to flush()
|
||||
}
|
||||
|
||||
case BUFFER_UNDERFLOW:
|
||||
throw new IllegalStateException();
|
||||
|
||||
default:
|
||||
if (DEBUG)
|
||||
LOG.debug("{} {} {}", this, wrapResultStatus, BufferUtil.toDetailString(_encryptedOutput));
|
||||
|
|
Loading…
Reference in New Issue