From: Nick Porter Date: Thu, 2 Feb 2023 10:17:03 +0000 (+0000) Subject: Use timeout setting from the connection configuration X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32db279730d644dc0412b5613c549f3618006fb5;p=thirdparty%2Ffreeradius-server.git Use timeout setting from the connection configuration --- diff --git a/src/modules/rlm_rest/rest.c b/src/modules/rlm_rest/rest.c index 4a1e1f93bf2..5c98fe61c5e 100644 --- a/src/modules/rlm_rest/rest.c +++ b/src/modules/rlm_rest/rest.c @@ -1729,7 +1729,6 @@ int rest_request_config(module_ctx_t const *mctx, rlm_rest_section_t const *sect char const *uri, char const *username, char const *password) { rlm_rest_t const *inst = talloc_get_type_abort(mctx->inst->data, rlm_rest_t); - rlm_rest_thread_t const *t = talloc_get_type_abort(mctx->thread, rlm_rest_thread_t); rlm_rest_curl_context_t *ctx = talloc_get_type_abort(randle->uctx, rlm_rest_curl_context_t); CURL *candle = randle->candle; fr_time_delta_t timeout; @@ -1771,7 +1770,7 @@ int rest_request_config(module_ctx_t const *mctx, rlm_rest_section_t const *sect FR_CURL_REQUEST_SET_OPTION(CURLOPT_NOSIGNAL, 1L); FR_CURL_REQUEST_SET_OPTION(CURLOPT_USERAGENT, "FreeRADIUS " RADIUSD_VERSION_STRING); - timeout = fr_pool_timeout(t->pool); + timeout = inst->conn_config.connect_timeout; RDEBUG3("Connect timeout is %pVs, request timeout is %pVs", fr_box_time_delta(timeout), fr_box_time_delta(section->timeout)); FR_CURL_REQUEST_SET_OPTION(CURLOPT_CONNECTTIMEOUT_MS, fr_time_delta_to_msec(timeout));