]> git.kaiwu.me - nginx.git/commit
Access log: removed dead ev->timedout check in flush timer handler.
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 7 Mar 2017 15:51:12 +0000 (18:51 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 7 Mar 2017 15:51:12 +0000 (18:51 +0300)
commitc1d8318d3112a2752971d76fc15d1fca8557691d
tree8761c4b48f436d848a1cb6e161dcd912ad78ef98
parentfca26c2e53d46549320a3b23ce0398c5921348dd
Access log: removed dead ev->timedout check in flush timer handler.

The ev->timedout flag is set on first timer expiration, and never reset
after it.  Due to this the code to stop the timer when the timer was
canceled never worked (except in a very specific time frame immediately
after start), and the timer was always armed again.  This essentially
resulted in a buffer flush at the end of an event loop iteration.

This behaviour actually seems to be better than just stopping the flush
timer for the whole shutdown, so it is preserved as is instead of fixing
the code to actually remove the timer.  It will be further improved by
upcoming changes to preserve cancelable timers if there are other timers
blocking shutdown.
src/http/modules/ngx_http_log_module.c
src/stream/ngx_stream_log_module.c