* - determine the time at which we should next be ticked.
*/
- /* Nothing to do yet if connection has not been started. */
- if (ch->state == QUIC_CHANNEL_STATE_IDLE)
- return;
-
- /* If we are in the TERMINATED state, there is nothing to do. */
- if (ossl_quic_channel_is_terminated(ch)) {
+ /*
+ * If the connection has not yet started, or we are in the TERMINATED state,
+ * there is nothing to do.
+ */
+ if (ch->state == QUIC_CHANNEL_STATE_IDLE
+ || ossl_quic_channel_is_terminated(ch)) {
res->net_read_desired = 0;
res->net_write_desired = 0;
res->notify_other_threads = 0;
return 0;
qctx_lock(&ctx);
- /*
- * TODO(QUIC SERVER): We should always tick the engine, whether the current
- * connection is started or not. When ticking the engine, we MUST avoid
- * inadvertently starting connections that haven't started, the guards
- * don't belong here.
- */
- if (ctx.qc == NULL || ctx.qc->started)
- ossl_quic_reactor_tick(ossl_quic_obj_get0_reactor(ctx.obj), 0);
+ ossl_quic_reactor_tick(ossl_quic_obj_get0_reactor(ctx.obj), 0);
qctx_unlock(&ctx);
return 1;
}
qctx_lock(&ctx);
+ if (do_tick)
+ ossl_quic_reactor_tick(ossl_quic_channel_get_reactor(ctx.qc->ch), 0);
+
if (!ctx.qc->started) {
/* We can only try to write on non-started connection. */
if ((events & SSL_POLL_EVENT_W) != 0)
goto end;
}
- if (do_tick)
- ossl_quic_reactor_tick(ossl_quic_channel_get_reactor(ctx.qc->ch), 0);
-
if (ctx.xso != NULL) {
/* SSL object has a stream component. */