dispatch from the timer thread to iterate
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
2244be64ef
commit
5424f67132
|
@ -157,6 +157,8 @@ public abstract class QuicSession
|
|||
List<Long> writableStreamIds = quicheConnection.writableStreamIds();
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("writable stream ids: {}", writableStreamIds);
|
||||
if (!writableStreamIds.isEmpty())
|
||||
{
|
||||
Runnable onWritable = () ->
|
||||
{
|
||||
for (Long writableStreamId : writableStreamIds)
|
||||
|
@ -165,6 +167,7 @@ public abstract class QuicSession
|
|||
}
|
||||
};
|
||||
dispatch(onWritable);
|
||||
}
|
||||
|
||||
List<Long> readableStreamIds = quicheConnection.readableStreamIds();
|
||||
if (LOG.isDebugEnabled())
|
||||
|
@ -281,8 +284,9 @@ public abstract class QuicSession
|
|||
LOG.debug("quiche timeout callback");
|
||||
quicheConnection.onTimeout();
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("re-iterating quiche after timeout");
|
||||
iterate();
|
||||
LOG.debug("re-iterating quiche after timeout cid={}", quicheConnectionId);
|
||||
// do not use the timer thread to iterate
|
||||
dispatch(() -> iterate());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue