From cfaee7741ce5602a01afa3001d0084949b9eb0ca Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Wed, 30 Jul 2025 09:23:40 -0400 Subject: [PATCH] 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 --- src/plugins/http/http.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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; } -- 2.16.6