Issue #3481 TLS Close

Updates from review:
 - revert outputShutdown logic

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2019-04-04 14:55:22 +11:00
parent db60003099
commit 36df72d455
1 changed files with 2 additions and 4 deletions

View File

@ -1102,9 +1102,7 @@ public class SslConnection extends AbstractConnection implements Connection.Upgr
if (flush)
{
if (flush(BufferUtil.EMPTY_BUFFER))
endp.shutdownOutput();
else if (!close)
if (!flush(BufferUtil.EMPTY_BUFFER) && !close)
{
Thread.yield();
// if we still can't flush, but we are not closing the endpoint,
@ -1112,7 +1110,7 @@ public class SslConnection extends AbstractConnection implements Connection.Upgr
// and continue as if we are closed. The assumption here is that
// the encrypted buffer will contain the entire close handshake
// and that a call to flush(EMPTY_BUFFER) is not needed.
endp.write(Callback.from(endp::shutdownOutput, t-> endp.close()), _encryptedOutput);
endp.write(Callback.from(()->{}, t-> endp.close()), _encryptedOutput);
}
}