fix closing of session

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
Ludovic Orban 2021-03-17 11:50:40 +01:00 committed by Simone Bordet
parent 25ee5e35ac
commit e35b480afd
1 changed files with 7 additions and 6 deletions

View File

@ -221,12 +221,9 @@ public class QuicSession
if (LOG.isDebugEnabled())
LOG.debug("quiche timeout callback");
quicheConnection.onTimeout();
if (quicheConnection.isConnectionClosed())
{
if (LOG.isDebugEnabled())
LOG.debug("quiche connection closed after timeout, re-flushing");
iterate();
}
if (LOG.isDebugEnabled())
LOG.debug("re-iterating quiche after timeout");
iterate();
}
};
}
@ -256,7 +253,11 @@ public class QuicSession
if (drained == 0)
{
if (quicheConnection.isConnectionClosed())
{
if (LOG.isDebugEnabled())
LOG.debug("quiche connection closed");
QuicSession.this.close();
}
return Action.IDLE;
}
BufferUtil.flipToFlush(cipherBuffer, pos);