From: Matus Fabian Date: Wed, 30 Jul 2025 13:23:40 +0000 (-0400) Subject: http: format_http_transport_half_open fix X-Git-Tag: v26.02-rc0~136 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F99%2F43499%2F1;p=vpp.git http: format_http_transport_half_open fix with postponed ho clenup underlying transport ho session might not exist anymore Type: fix Change-Id: Iadb7f2b901d13e26f0d39bffcd11cdebc2f9357f Signed-off-by: Matus Fabian --- diff --git a/src/plugins/http/http.c b/src/plugins/http/http.c index b387b61ae00..094260f1edf 100644 --- a/src/plugins/http/http.c +++ b/src/plugins/http/http.c @@ -1375,11 +1375,18 @@ format_http_transport_half_open (u8 *s, va_list *args) session_t *tcp_ho; ho_hc = http_ho_conn_get (ho_index); - tcp_ho = session_get_from_handle (ho_hc->hc_tc_session_handle); + tcp_ho = session_get_from_handle_if_valid (ho_hc->hc_tc_session_handle); - s = format (s, "[%d:%d][H] half-open app_wrk %u ts %d:%d", + if (tcp_ho) + s = + format (s, "[%d:%d][H] half-open app_wrk %u ts %d:%d", ho_hc->c_thread_index, ho_hc->c_s_index, ho_hc->hc_pa_wrk_index, tcp_ho->thread_index, tcp_ho->session_index); + else + s = + format (s, "[%d:%d][H] half-open app_wrk %u (postponed cleanup)", + ho_hc->c_thread_index, ho_hc->c_s_index, ho_hc->hc_pa_wrk_index); + return s; }