Skip to content

Commit ff64f9a

Browse files
author
Tuure Vartiainen
committed
bugfix: get return value of ssl_psk_by_lua_* pcall.
1 parent 56181ec commit ff64f9a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ngx_http_lua_ssl_pskby.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,14 @@ ngx_http_lua_ssl_psk_by_chunk(lua_State *L, ngx_http_request_t *r)
575575
return NGX_ERROR;
576576
}
577577

578+
/* rc == 0 */
579+
rc = (ngx_int_t) lua_tointeger(L, -1);
580+
dd("got return value: %d", (int) rc);
581+
582+
if (rc != NGX_OK) {
583+
rc = NGX_ERROR;
584+
}
585+
578586
lua_settop(L, 0); /* clear remaining elems on stack */
579587
ngx_http_lua_finalize_request(r, rc);
580588
return rc;

0 commit comments

Comments
 (0)