Skip to content

Commit e1159b9

Browse files
committed
fix: Close connection when set keepalive failed
1 parent 1833103 commit e1159b9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/resty/http.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,7 @@ function _M.request_uri(self, uri, params)
959959
else
960960
local ok, err = self:set_keepalive(params.keepalive_timeout, params.keepalive_pool)
961961
if not ok then
962+
self:close()
962963
ngx_log(ngx_ERR, err)
963964
end
964965

0 commit comments

Comments
 (0)