Skip to content

Commit e391e7a

Browse files
close socket asap.
1 parent 9678596 commit e391e7a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ngx_http_lua_pipe.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2439,6 +2439,8 @@ ngx_http_lua_pipe_proc_read_stdout_cleanup(void *data)
24392439
if (c) {
24402440
rev = c->read;
24412441
ngx_http_lua_pipe_clear_event(rev);
2442+
ngx_close_connection(c);
2443+
proc->pipe->stdout_ctx->c = NULL;
24422444
}
24432445

24442446
wait_co_ctx->cleanup = NULL;
@@ -2461,6 +2463,8 @@ ngx_http_lua_pipe_proc_read_stderr_cleanup(void *data)
24612463
if (c) {
24622464
rev = c->read;
24632465
ngx_http_lua_pipe_clear_event(rev);
2466+
ngx_close_connection(c);
2467+
proc->pipe->stderr_ctx->c = NULL;
24642468
}
24652469

24662470
wait_co_ctx->cleanup = NULL;
@@ -2483,6 +2487,8 @@ ngx_http_lua_pipe_proc_write_cleanup(void *data)
24832487
if (c) {
24842488
wev = c->write;
24852489
ngx_http_lua_pipe_clear_event(wev);
2490+
ngx_close_connection(c);
2491+
proc->pipe->stdin_ctx->c = NULL;
24862492
}
24872493

24882494
wait_co_ctx->cleanup = NULL;

0 commit comments

Comments
 (0)