#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())
|
||||
LOG.debug("outward closing 0x{}/{} on {}", Long.toHexString(error), reason, this);
|
||||
quicheConnection.close(error, reason);
|
||||
try
|
||||
{
|
||||
// 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);
|
||||
}
|
||||
// Flushing will eventually forward the outward close to the connection.
|
||||
flush();
|
||||
}
|
||||
|
||||
private void finishOutwardClose(Throwable failure)
|
||||
|
@ -419,7 +410,6 @@ public abstract class QuicSession extends ContainerLifeCycle
|
|||
try
|
||||
{
|
||||
endPoints.clear();
|
||||
flusher.close();
|
||||
getQuicConnection().outwardClose(this, failure);
|
||||
}
|
||||
finally
|
||||
|
@ -464,13 +454,6 @@ public abstract class QuicSession extends ContainerLifeCycle
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close()
|
||||
{
|
||||
super.close();
|
||||
timeout.destroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Action process() throws IOException
|
||||
{
|
||||
|
@ -523,8 +506,7 @@ public abstract class QuicSession extends ContainerLifeCycle
|
|||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("connection closed {}", QuicSession.this);
|
||||
byteBufferPool.release(cipherBuffer);
|
||||
finishOutwardClose(new ClosedChannelException());
|
||||
finish(new ClosedChannelException());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -532,8 +514,14 @@ public abstract class QuicSession extends ContainerLifeCycle
|
|||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("failed to write cipher bytes, closing session on {}", QuicSession.this, failure);
|
||||
finish(failure);
|
||||
}
|
||||
|
||||
private void finish(Throwable failure)
|
||||
{
|
||||
byteBufferPool.release(cipherBuffer);
|
||||
finishOutwardClose(failure);
|
||||
timeout.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue