Skip to content

Commit a6ee03a

Browse files
bugfix: cleanup of http request will not be callled for the request created by ngx_http_lua_create_fake_request.
1 parent 992bfc3 commit a6ee03a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ngx_http_lua_pipe.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ ngx_http_lua_ffi_pipe_spawn(ngx_http_request_t *r,
620620
ngx_http_lua_pipe_node_t *pipe_node;
621621
struct sigaction sa;
622622
ngx_http_lua_pipe_signal_t *sig;
623-
ngx_http_cleanup_t *cln;
623+
ngx_pool_cleanup_t *cln;
624624
sigset_t set;
625625

626626
pool_size = ngx_align(NGX_MIN_POOL_SIZE + buffer_size * 2,
@@ -909,15 +909,15 @@ ngx_http_lua_ffi_pipe_spawn(ngx_http_request_t *r,
909909
}
910910

911911
if (pp->cleanup == NULL) {
912-
cln = ngx_http_lua_cleanup_add(r, 0);
912+
cln = ngx_pool_cleanup_add(r->pool, 0);
913913

914914
if (cln == NULL) {
915915
*errbuf_size = ngx_snprintf(errbuf, *errbuf_size, "no memory")
916916
- errbuf;
917917
goto close_in_out_err_fd;
918918
}
919919

920-
cln->handler = (ngx_http_cleanup_pt) ngx_http_lua_ffi_pipe_proc_destroy;
920+
cln->handler = (ngx_pool_cleanup_pt) ngx_http_lua_ffi_pipe_proc_destroy;
921921
cln->data = proc;
922922
pp->cleanup = &cln->handler;
923923
pp->r = r;

0 commit comments

Comments
 (0)