From e1159b9d1f9ea7ddc73084112424f63f050ddb24 Mon Sep 17 00:00:00 2001 From: Aris Date: Fri, 21 Mar 2025 11:17:02 +0800 Subject: [PATCH] fix: Close connection when set keepalive failed --- lib/resty/http.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/resty/http.lua b/lib/resty/http.lua index a85f85a..9bcee1a 100644 --- a/lib/resty/http.lua +++ b/lib/resty/http.lua @@ -959,6 +959,7 @@ function _M.request_uri(self, uri, params) else local ok, err = self:set_keepalive(params.keepalive_timeout, params.keepalive_pool) if not ok then + self:close() ngx_log(ngx_ERR, err) end