Skip to content

Commit 3a7075d

Browse files
committed
added comments to the ngx_http_lua_run_thread function; also fixed a coding style issue.
1 parent 51a68ac commit 3a7075d

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/ngx_http_lua_util.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,15 @@ ngx_http_lua_request_cleanup(void *data)
813813
}
814814

815815

816+
/*
817+
* description:
818+
* run a Lua coroutine specified by ctx->cur_co_ctx->co
819+
* return value:
820+
* NGX_AGAIN: I/O interruption: r->main->count intact
821+
* NGX_DONE: I/O interruption: r->main->count already incremented by 1
822+
* NGX_ERROR: error
823+
* >= 200 HTTP status code
824+
*/
816825
ngx_int_t
817826
ngx_http_lua_run_thread(lua_State *L, ngx_http_request_t *r,
818827
ngx_http_lua_ctx_t *ctx, int nret)
@@ -1829,9 +1838,7 @@ ngx_http_lua_handle_exit(lua_State *L, ngx_http_request_t *r,
18291838
rc = ngx_http_lua_send_chain_link(r, ctx,
18301839
NULL /* indicate last_buf */);
18311840

1832-
if (rc == NGX_ERROR ||
1833-
rc >= NGX_HTTP_SPECIAL_RESPONSE)
1834-
{
1841+
if (rc == NGX_ERROR || rc >= NGX_HTTP_SPECIAL_RESPONSE) {
18351842
return rc;
18361843
}
18371844
}

0 commit comments

Comments
 (0)