jetty-9 SslConnection fill does not try to send close handshake
This commit is contained in:
parent
73401791d7
commit
cb4e7982b1
|
@ -519,35 +519,9 @@ public class SslConnection extends AbstractConnection
|
|||
|
||||
case NEED_WRAP:
|
||||
// we need to send some handshake data (probably to send a close handshake).
|
||||
|
||||
// If we were called from flush,
|
||||
if (buffer==__FLUSH_CALLED_FILL)
|
||||
return -1; // it can deal with the close handshake
|
||||
|
||||
// We need to call flush to cause the wrap to happen
|
||||
_fillRequiresFlushToProgress = true;
|
||||
try
|
||||
{
|
||||
// flushing an empty buffer will invoke the wrap mechanisms
|
||||
flush(__FILL_CALLED_FLUSH);
|
||||
// If encrypted output is all written, we can proceed with close
|
||||
if (BufferUtil.isEmpty(_encryptedOutput))
|
||||
{
|
||||
_fillRequiresFlushToProgress = false;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Otherwise return as if a normal fill and let a subsequent call
|
||||
// return -1 to the caller.
|
||||
return unwrapResult.bytesProduced();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
LOG.debug(e);
|
||||
// The flush failed, oh well nothing more to do than tell the app
|
||||
// that the connection is closed.
|
||||
return -1;
|
||||
}
|
||||
// but that will not enable any extra data to fill, so we just return -1
|
||||
// The wrapping can be done by any output drivers doing flushing or shutdown output.
|
||||
return -1;
|
||||
}
|
||||
throw new IllegalStateException();
|
||||
|
||||
|
|
Loading…
Reference in New Issue