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 _decryptedDirectBuffers = false;
|
||||
private boolean _renegotiationAllowed;
|
||||
private boolean _closedOutbound;
|
||||
private final Runnable _runCompletWrite = new Runnable()
|
||||
{
|
||||
@Override
|
||||
|
@ -913,19 +914,23 @@ public class SslConnection extends AbstractConnection
|
|||
@Override
|
||||
public void shutdownOutput()
|
||||
{
|
||||
boolean ishut = isInputShutdown();
|
||||
boolean oshut = isOutputShutdown();
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} shutdownOutput: oshut={}, ishut={}", SslConnection.this, oshut, ishut);
|
||||
try
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
boolean ishut = isInputShutdown();
|
||||
boolean oshut = isOutputShutdown();
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} shutdownOutput: oshut={}, ishut={}", SslConnection.this, oshut, ishut);
|
||||
|
||||
if (!oshut)
|
||||
{
|
||||
if (!_closedOutbound)
|
||||
{
|
||||
_closedOutbound=true; // Only attempt this once
|
||||
_sslEngine.closeOutbound();
|
||||
// Send the TLS close message.
|
||||
flush(BufferUtil.EMPTY_BUFFER);
|
||||
flush(BufferUtil.EMPTY_BUFFER); // Send the TLS close message.
|
||||
}
|
||||
if (ishut)
|
||||
getEndPoint().close();
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue