Skip to content

Commit 6767f0c

Browse files
committed
fix arguments check in sslhandshake
1 parent db95a04 commit 6767f0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/resty/core/socket.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ local function sslhandshake(cosocket, reused_session, server_name, ssl_verify,
177177
local n = select("#", ...)
178178
if not cosocket or n > 1 then
179179
error("ngx.socket sslhandshake: expecting 1 ~ 5 arguments " ..
180-
"(including the object), but seen " .. (5 + n))
180+
"(including the object), but seen " .. (cosocket and 5 + n or 0))
181181
end
182182

183183
local r = get_request()

0 commit comments

Comments
 (0)