From 4e437f3007c89e305118ebb7b4bbfc7b1f4e512d Mon Sep 17 00:00:00 2001 From: Constantin Papizh <p.const@bk.ru> Date: Wed, 6 Jan 2021 09:03:02 +0300 Subject: [PATCH] Request timeout must call err_callback --- dap-sdk/net/client/dap_client_http.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dap-sdk/net/client/dap_client_http.c b/dap-sdk/net/client/dap_client_http.c index 66011d201f..c258e0037e 100644 --- a/dap-sdk/net/client/dap_client_http.c +++ b/dap-sdk/net/client/dap_client_http.c @@ -126,6 +126,8 @@ static bool s_timer_timeout_check(void * a_arg) dap_client_http_pvt_t * l_http_pvt = PVT(l_es); log_it(L_WARNING,"Connection timeout for request http://%s:%u/%s, possible network problems or host is down", l_http_pvt->uplink_addr, l_http_pvt->uplink_port, l_http_pvt->path); + if(l_http_pvt->error_callback) + l_http_pvt->error_callback(ETIMEDOUT, l_http_pvt->obj); l_http_pvt->is_closed_by_timeout = true; l_es->flags |= DAP_SOCK_SIGNAL_CLOSE; } -- GitLab