Skip to content

Commit b98a7f7

Browse files
committed
bugfix: stream-typed cosockets: we did not set the "error" field of the ngx_connection_t object which MIGHT lead to socket leaks.
1 parent d7d4547 commit b98a7f7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ngx_http_lua_socket_tcp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2876,6 +2876,7 @@ ngx_http_lua_socket_send(ngx_http_request_t *r,
28762876
}
28772877

28782878
if (n == NGX_ERROR) {
2879+
c->error = 1;
28792880
u->socket_errno = ngx_socket_errno;
28802881
ngx_http_lua_socket_handle_write_error(r, u,
28812882
NGX_HTTP_LUA_SOCKET_FT_ERROR);

0 commit comments

Comments
 (0)