#10519 ignore IllegalStateException thrown by flusher when closing

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
Ludovic Orban 2023-10-18 18:14:12 +02:00
parent 6e7fafaf85
commit caf46b0b0b
1 changed files with 11 additions and 2 deletions

View File

@ -401,8 +401,17 @@ public abstract class QuicSession extends ContainerLifeCycle
if (LOG.isDebugEnabled())
LOG.debug("outward closing 0x{}/{} on {}", Long.toHexString(error), reason, this);
quicheConnection.close(error, reason);
// Flushing will eventually forward the outward close to the connection.
flush();
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);
}
}
private void finishOutwardClose(Throwable failure)