diff options
author | Matus Fabian <matfabia@cisco.com> | 2024-05-13 10:29:11 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2024-05-14 22:38:23 +0000 |
commit | 3d00893c37a725da6ead642a8d8852e9f5c13628 (patch) | |
tree | d5388d969607035b20edaf27a0313640b9b1d5ac /src/plugins/hs_apps | |
parent | b7a9ed75fbce1e5e69441916a14235b3a1403593 (diff) |
http: notify client when connection failed
Type: fix
Change-Id: I87054e9667fe990d9a2dc3950bc3ce348460018a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/hs_apps')
-rw-r--r-- | src/plugins/hs_apps/http_client_cli.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/hs_apps/http_client_cli.c b/src/plugins/hs_apps/http_client_cli.c index 1a321bf44a8..a99169bafea 100644 --- a/src/plugins/hs_apps/http_client_cli.c +++ b/src/plugins/hs_apps/http_client_cli.c @@ -67,6 +67,7 @@ typedef enum { HCC_REPLY_RECEIVED = 100, HCC_TRANSPORT_CLOSED, + HCC_CONNECT_FAILED, } hcc_cli_signal_t; static hcc_main_t hcc_main; @@ -135,6 +136,8 @@ hcc_ts_connected_callback (u32 app_index, u32 hc_index, session_t *as, { clib_warning ("connected error: hc_index(%d): %U", hc_index, format_session_error, err); + vlib_process_signal_event_mt (hcm->vlib_main, hcm->cli_node_index, + HCC_CONNECT_FAILED, 0); return -1; } @@ -425,6 +428,9 @@ hcc_run (vlib_main_t *vm, int print_output) case HCC_TRANSPORT_CLOSED: err = clib_error_return (0, "error, transport closed"); break; + case HCC_CONNECT_FAILED: + err = clib_error_return (0, "failed to connect"); + break; default: err = clib_error_return (0, "unexpected event %d", event_type); break; |