Skip to content

Commit 9e127b0

Browse files
committed
bugfix: always remove the read event timer during downstream cosocket finalization if it is not removed yet.
1 parent 9fdf636 commit 9e127b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ngx_http_lua_socket_tcp.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2171,6 +2171,11 @@ ngx_http_lua_socket_tcp_finalize(ngx_http_request_t *r,
21712171

21722172
if (u->is_downstream) {
21732173
r->read_event_handler = ngx_http_block_reading;
2174+
2175+
if (r->connection->read->timer_set) {
2176+
ngx_del_timer(r->connection->read);
2177+
}
2178+
21742179
u->peer.connection = NULL;
21752180
return;
21762181
}

0 commit comments

Comments
 (0)