summaryrefslogtreecommitdiffstats
path: root/src/plugins/http
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2024-05-03 16:25:40 +0200
committerFlorin Coras <florin.coras@gmail.com>2024-05-07 17:01:01 +0000
commitb8c762cc22687c3e4ca89f7f2f95b43451e3c9b7 (patch)
treebb1650bdd92797613c325e9661a0933dac1a716f /src/plugins/http
parent1a319aadc68c218f741a7cb23acbe70c4addae92 (diff)
http: notify client on request error
Notify client app that we errored out while trying to generate request. Type: fix Change-Id: I3e20fe22d8a927ae8e9bf8391297e10c974dc941 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/http')
-rw-r--r--src/plugins/http/http.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/http/http.c b/src/plugins/http/http.c
index 37a6de71bc7..737e7b034a9 100644
--- a/src/plugins/http/http.c
+++ b/src/plugins/http/http.c
@@ -598,7 +598,6 @@ http_state_wait_server_reply (http_conn_t *hc, transport_send_params_t *sp)
}
error:
-
http_send_error (hc, ec);
session_transport_closing_notify (&hc->connection);
http_disconnect_transport (hc);
@@ -838,7 +837,9 @@ http_state_wait_app_method (http_conn_t *hc, transport_send_params_t *sp)
return HTTP_SM_STOP;
error:
+ svm_fifo_dequeue_drop_all (as->tx_fifo);
session_transport_closing_notify (&hc->connection);
+ session_transport_closed_notify (&hc->connection);
http_disconnect_transport (hc);
return HTTP_SM_ERROR;
}
@@ -1248,7 +1249,11 @@ http_transport_close (u32 hc_index, u32 thread_index)
http_disconnect_transport (hc);
return;
}
-
+ else if (hc->state == HTTP_CONN_STATE_CLOSED)
+ {
+ HTTP_DBG (1, "nothing to do, already closed");
+ return;
+ }
as = session_get_from_handle (hc->h_pa_session_handle);
/* Nothing more to send, confirm close */