Skip to content

Commit fb03e45

Browse files
committed
Close socket on handshake failure in simple mode
1 parent 4b8b9dc commit fb03e45

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/resty/http.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,13 +855,17 @@ function _M.request_uri(self, uri, params)
855855

856856
if scheme == "https" then
857857
local verify = true
858+
858859
if params.ssl_verify == false then
859860
verify = false
860861
end
862+
861863
local ok, err = self:ssl_handshake(nil, host, verify)
862864
if not ok then
865+
self:close()
863866
return nil, err
864867
end
868+
865869
end
866870

867871
local res, err = self:request(params)

0 commit comments

Comments
 (0)