Skip to content

Commit 2ca05ce

Browse files
author
Tuure Vartiainen
committed
bugfix: copy ctx->exit_code to cctx->exit_code in ngx_http_lua_ssl_cert_by_chunk.
1 parent 7fd69c3 commit 2ca05ce

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ngx_http_lua_ssl_certby.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,10 @@ ngx_http_lua_ssl_cert_by_chunk(lua_State *L, ngx_http_request_t *r)
535535
rc = ngx_http_lua_run_thread(L, r, ctx, 0);
536536

537537
if (rc == NGX_ERROR || rc >= NGX_OK) {
538-
/* do nothing */
539-
538+
/* copy ctx->exit_code to cctx->exit_code */
539+
if (ctx->exited) {
540+
cctx->exit_code = ctx->exit_code;
541+
}
540542
} else if (rc == NGX_AGAIN) {
541543
rc = ngx_http_lua_content_run_posted_threads(L, r, ctx, 0);
542544

0 commit comments

Comments
 (0)