[PATCH 01 of 10] Mail: switched to posted events when resuming reading
Maxim Dounin
mdounin at mdounin.ru
Fri Mar 15 18:14:15 UTC 2024
# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1710526239 -10800
# Fri Mar 15 21:10:39 2024 +0300
# Node ID dc9a4c5573411f8f6115db56d201ce0fa2c002fc
# Parent c363ad6b3b23ae7fed28a7cdfa20b0cb3fc6a584
Mail: switched to posted events when resuming reading.
When resuming reading after ngx_mail_send(), switched to using posted
events instead of a direct event handler call. This ensures limited
stack usage when processing multiple pipelined commands.
diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c
--- a/src/mail/ngx_mail_handler.c
+++ b/src/mail/ngx_mail_handler.c
@@ -799,7 +799,7 @@ ngx_mail_send(ngx_event_t *wev)
}
if (s->blocked) {
- c->read->handler(c->read);
+ ngx_post_event(c->read, &ngx_posted_events);
}
return;
More information about the nginx-devel
mailing list