From: Florin Coras Date: Wed, 17 Nov 2021 19:41:10 +0000 (-0800) Subject: session: fix state check in switch pool X-Git-Tag: v22.06-rc0~229 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=fc8d0c510372823ac029b6330e876fab9400dbae;p=vpp.git session: fix state check in switch pool This affect udp only Type: fix Signed-off-by: Florin Coras Change-Id: I5e05e9c77b733b9e10c14cc9ef610c9bff216fa0 --- diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index a50d3f4b9e0..3a7e98053c6 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -999,12 +999,12 @@ session_switch_pool (void *cb_args) ASSERT (args->thread_index == vlib_get_thread_index ()); s = session_get (args->session_index, args->thread_index); + /* Check if session closed during migration */ + rargs.is_closed = s->session_state >= SESSION_STATE_TRANSPORT_CLOSING; + transport_cleanup (session_get_transport_proto (s), s->connection_index, s->thread_index); - /* Check if session closed during migration */ - rargs.is_closed = s->session_state > SESSION_STATE_READY; - app_wrk = app_worker_get_if_valid (s->app_wrk_index); if (app_wrk) {