diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c index 767320da1..af54b5050 100644 --- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c @@ -505,12 +505,6 @@ ngx_ssl_handshake(ngx_connection_t *c) if (n == 1) { - if (ngx_event_flags & NGX_USE_LEVEL_EVENT) { - c->read->ready = 0; - } - - c->write->ready = 1; - if (ngx_handle_read_event(c->read, 0) == NGX_ERROR) { return NGX_ERROR; } diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c index 2dc5d7a31..4cc5e3e62 100644 --- a/src/mail/ngx_mail_handler.c +++ b/src/mail/ngx_mail_handler.c @@ -198,6 +198,8 @@ ngx_mail_ssl_handshake_handler(ngx_connection_t *c) return; } + c->read->ready = 0; + ngx_mail_init_session(c); return; }