Provisional fix for #681
This commit is contained in:
parent
77b91038db
commit
3a52b46115
|
@ -92,6 +92,7 @@ public class SslConnection extends AbstractConnection
|
||||||
private final boolean _encryptedDirectBuffers = true;
|
private final boolean _encryptedDirectBuffers = true;
|
||||||
private final boolean _decryptedDirectBuffers = false;
|
private final boolean _decryptedDirectBuffers = false;
|
||||||
private boolean _renegotiationAllowed;
|
private boolean _renegotiationAllowed;
|
||||||
|
private boolean _closedOutbound;
|
||||||
private final Runnable _runCompletWrite = new Runnable()
|
private final Runnable _runCompletWrite = new Runnable()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -913,19 +914,23 @@ public class SslConnection extends AbstractConnection
|
||||||
@Override
|
@Override
|
||||||
public void shutdownOutput()
|
public void shutdownOutput()
|
||||||
{
|
{
|
||||||
boolean ishut = isInputShutdown();
|
|
||||||
boolean oshut = isOutputShutdown();
|
|
||||||
if (LOG.isDebugEnabled())
|
|
||||||
LOG.debug("{} shutdownOutput: oshut={}, ishut={}", SslConnection.this, oshut, ishut);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
|
boolean ishut = isInputShutdown();
|
||||||
|
boolean oshut = isOutputShutdown();
|
||||||
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("{} shutdownOutput: oshut={}, ishut={}", SslConnection.this, oshut, ishut);
|
||||||
|
|
||||||
if (!oshut)
|
if (!oshut)
|
||||||
{
|
{
|
||||||
_sslEngine.closeOutbound();
|
if (!_closedOutbound)
|
||||||
// Send the TLS close message.
|
{
|
||||||
flush(BufferUtil.EMPTY_BUFFER);
|
_closedOutbound=true; // Only attempt this once
|
||||||
|
_sslEngine.closeOutbound();
|
||||||
|
flush(BufferUtil.EMPTY_BUFFER); // Send the TLS close message.
|
||||||
|
}
|
||||||
if (ishut)
|
if (ishut)
|
||||||
getEndPoint().close();
|
getEndPoint().close();
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue