From 8df4468014310c8a880d3edf90ae1edfca5197bd Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 22 Oct 2019 16:04:56 +0300 Subject: Fixing idle connection close function. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There was a typo: nxt_queue_head() used instead of nxt_queue_first() in connection iteration loop. This prevents idle connection close on quit. This closes #334 issue on GitHub. Thanks to 洪志道 (Hong Zhi Dao). --- src/nxt_runtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nxt_runtime.c') diff --git a/src/nxt_runtime.c b/src/nxt_runtime.c index de41ba4d..9efe7500 100644 --- a/src/nxt_runtime.c +++ b/src/nxt_runtime.c @@ -459,7 +459,7 @@ nxt_runtime_close_idle_connections(nxt_event_engine_t *engine) idle = &engine->idle_connections; - for (link = nxt_queue_head(idle); + for (link = nxt_queue_first(idle); link != nxt_queue_tail(idle); link = next) { -- cgit