details:   http://freenginx.org/hg/nginx/rev/15ab3e70ab16
branches:  
changeset: 9487:15ab3e70ab16
user:      Maxim Dounin <[email protected]>
date:      Thu Mar 26 06:51:22 2026 +0300
description:
OCSP stapling: added missing event handling after writing.

If we need to be notified about further events, ngx_handle_write_event()
needs to be called after a write event is processed.  Without this,
an event can be removed from the kernel and won't be reported again,
notably when using oneshot event methods, such as eventport on Solaris.

diffstat:

 src/event/ngx_event_openssl_stapling.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff --git a/src/event/ngx_event_openssl_stapling.c 
b/src/event/ngx_event_openssl_stapling.c
--- a/src/event/ngx_event_openssl_stapling.c
+++ b/src/event/ngx_event_openssl_stapling.c
@@ -1598,6 +1598,10 @@ ngx_ssl_ocsp_write_handler(ngx_event_t *
     if (!wev->timer_set && ctx->timeout) {
         ngx_add_timer(wev, ctx->timeout);
     }
+
+    if (ngx_handle_write_event(wev, 0) != NGX_OK) {
+        ngx_ssl_ocsp_error(ctx);
+    }
 }
 
 

Reply via email to