Skip to content

Commit

Permalink
fix some return value errors
Browse files Browse the repository at this point in the history
  • Loading branch information
catbro666 authored and pintsized committed Feb 29, 2024
1 parent f2f7460 commit bf3e411
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/resty/http_connect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ local function connect(self, options)
local proxy_uri_t
proxy_uri_t, err = self:parse_uri(proxy_uri)
if not proxy_uri_t then
return nil, "uri parse error: ", err
return nil, "uri parse error: " .. err
end

local proxy_scheme = proxy_uri_t[1]
Expand Down Expand Up @@ -260,7 +260,7 @@ local function connect(self, options)
if not ok then
return nil, "failed to connect to: " .. (proxy_host or "") ..
":" .. (proxy_port or "") ..
": ", err
": " .. err
end

if ssl and sock:getreusedtimes() == 0 then
Expand All @@ -280,7 +280,7 @@ local function connect(self, options)
})

if not res then
return nil, "failed to issue CONNECT to proxy:", err
return nil, "failed to issue CONNECT to proxy: " .. err
end

if res.status < 200 or res.status > 299 then
Expand Down

0 comments on commit bf3e411

Please sign in to comment.