Skip to content

Commit 75db2e6

Browse files
author
linjp1
committed
bugfix: fix issue #499,to avoid unexpect assertion when c func return FFI_OK immediately.
1 parent 8193d5e commit 75db2e6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/resty/core/socket.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,15 @@ local function sslhandshake(cosocket, reused_session, server_name, ssl_verify,
257257
error("no request ctx found", 2)
258258
end
259259

260+
if rc == FFI_OK then
261+
if reused_session == false then
262+
return true
263+
end
264+
265+
rc = C.ngx_http_lua_ffi_socket_tcp_get_sslhandshake_result(r, u,
266+
session_ptr, errmsg, openssl_error_code)
267+
end
268+
260269
while true do
261270
if rc == FFI_ERROR then
262271
if openssl_error_code[0] ~= 0 then

0 commit comments

Comments
 (0)