quic: fix timer update

Use ctx timer wheel not current thread since connects are done on main
but the ctx is allocated on first worker.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibed371bed12970d0d1ae4572f36df0bb1fb70b0f
This commit is contained in:
Florin Coras
2021-05-20 14:01:11 -07:00
committed by Damjan Marion
parent 22a55e6790
commit 0131477153

View File

@ -1149,7 +1149,9 @@ quic_update_timer (quic_ctx_t * ctx)
}
}
tw = &quic_main.wrk_ctx[vlib_get_thread_index ()].timer_wheel;
ASSERT (vlib_get_thread_index () == ctx->c_thread_index ||
vlib_get_thread_index () == 0);
tw = &quic_main.wrk_ctx[ctx->c_thread_index].timer_wheel;
QUIC_DBG (4, "Timer set to %ld (int %ld) for ctx %u", next_timeout,
next_interval, ctx->c_c_index);