mirror of
https://github.com/nginx/nginx.git
synced 2026-05-13 09:36:42 +00:00
Mail: added missing event handling after blocking events.
As long as a read event is blocked (ignored), ngx_handle_read_event() needs to be called to make sure no further notifications will be triggered when using level-triggered event methods, such as select() or poll().
This commit is contained in:
parent
d5a31fdad5
commit
8ed63c936c
3 changed files with 18 additions and 0 deletions
|
|
@ -123,6 +123,12 @@ ngx_mail_imap_auth_state(ngx_event_t *rev)
|
|||
if (s->out.len) {
|
||||
ngx_log_debug0(NGX_LOG_DEBUG_MAIL, c->log, 0, "imap send handler busy");
|
||||
s->blocked = 1;
|
||||
|
||||
if (ngx_handle_read_event(c->read, 0) != NGX_OK) {
|
||||
ngx_mail_close_connection(c);
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -138,6 +138,12 @@ ngx_mail_pop3_auth_state(ngx_event_t *rev)
|
|||
if (s->out.len) {
|
||||
ngx_log_debug0(NGX_LOG_DEBUG_MAIL, c->log, 0, "pop3 send handler busy");
|
||||
s->blocked = 1;
|
||||
|
||||
if (ngx_handle_read_event(c->read, 0) != NGX_OK) {
|
||||
ngx_mail_close_connection(c);
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -449,6 +449,12 @@ ngx_mail_smtp_auth_state(ngx_event_t *rev)
|
|||
if (s->out.len) {
|
||||
ngx_log_debug0(NGX_LOG_DEBUG_MAIL, c->log, 0, "smtp send handler busy");
|
||||
s->blocked = 1;
|
||||
|
||||
if (ngx_handle_read_event(c->read, 0) != NGX_OK) {
|
||||
ngx_mail_close_connection(c);
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue