]> git.kaiwu.me - nginx.git/commit
SSL: reworked posted next events again.
authorMaxim Dounin <mdounin@mdounin.ru>
Fri, 27 Dec 2019 16:43:01 +0000 (19:43 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Fri, 27 Dec 2019 16:43:01 +0000 (19:43 +0300)
commitfb34316d68511bd0986d3153dfea93d21363016d
tree856ad57f9a377a3034fe8f553e8cf507a7c639f2
parent8ca5cab66329feea2352b9b705dd107378363596
SSL: reworked posted next events again.

Previous change 1ce3f01a4355 incorrectly introduced processing of the
ngx_posted_next_events queue at the end of operation, effectively making
posted next events a nop, since at the end of an event loop iteration
the queue is always empty.  Correct approach is to move events to the
ngx_posted_events queue at an iteration start, as it was done previously.

Further, in some cases the c->read event might be already in the
ngx_posted_events queue, and calling ngx_post_event() with the
ngx_posted_next_events queue won't do anything.  To make sure the event
will be correctly placed into the ngx_posted_next_events queue
we now check if it is already posted.
src/event/ngx_event.c
src/event/ngx_event_openssl.c
src/event/ngx_event_posted.c
src/event/ngx_event_posted.h