#10519 do not close the flusher to avoid an ISE when iterating it during idle timeout
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
a8a8c8b9eb
commit
8b5deea657
|
@ -401,17 +401,8 @@ public abstract class QuicSession extends ContainerLifeCycle
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("outward closing 0x{}/{} on {}", Long.toHexString(error), reason, this);
|
LOG.debug("outward closing 0x{}/{} on {}", Long.toHexString(error), reason, this);
|
||||||
quicheConnection.close(error, reason);
|
quicheConnection.close(error, reason);
|
||||||
try
|
// Flushing will eventually forward the outward close to the connection.
|
||||||
{
|
flush();
|
||||||
// Flushing will eventually forward the outward close to the connection.
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
catch (IllegalStateException ise)
|
|
||||||
{
|
|
||||||
// Flusher already is in CLOSED state, nothing else to do.
|
|
||||||
if (LOG.isDebugEnabled())
|
|
||||||
LOG.debug("IllegalStateException caught while flushing, flusher={} {}", flusher, this, ise);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void finishOutwardClose(Throwable failure)
|
private void finishOutwardClose(Throwable failure)
|
||||||
|
@ -419,7 +410,6 @@ public abstract class QuicSession extends ContainerLifeCycle
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
endPoints.clear();
|
endPoints.clear();
|
||||||
flusher.close();
|
|
||||||
getQuicConnection().outwardClose(this, failure);
|
getQuicConnection().outwardClose(this, failure);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
@ -464,13 +454,6 @@ public abstract class QuicSession extends ContainerLifeCycle
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void close()
|
|
||||||
{
|
|
||||||
super.close();
|
|
||||||
timeout.destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Action process() throws IOException
|
protected Action process() throws IOException
|
||||||
{
|
{
|
||||||
|
@ -523,8 +506,7 @@ public abstract class QuicSession extends ContainerLifeCycle
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("connection closed {}", QuicSession.this);
|
LOG.debug("connection closed {}", QuicSession.this);
|
||||||
byteBufferPool.release(cipherBuffer);
|
finish(new ClosedChannelException());
|
||||||
finishOutwardClose(new ClosedChannelException());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -532,8 +514,14 @@ public abstract class QuicSession extends ContainerLifeCycle
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("failed to write cipher bytes, closing session on {}", QuicSession.this, failure);
|
LOG.debug("failed to write cipher bytes, closing session on {}", QuicSession.this, failure);
|
||||||
|
finish(failure);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void finish(Throwable failure)
|
||||||
|
{
|
||||||
byteBufferPool.release(cipherBuffer);
|
byteBufferPool.release(cipherBuffer);
|
||||||
finishOutwardClose(failure);
|
finishOutwardClose(failure);
|
||||||
|
timeout.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue