From 73c80d82c1c7c1e8f1eb416ed378a2d541c9675b Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 20 Oct 2006 20:43:01 +0000 Subject: [PATCH] disable write level event while waiting auth server response --- src/imap/ngx_imap_auth_http_module.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/imap/ngx_imap_auth_http_module.c b/src/imap/ngx_imap_auth_http_module.c index 8dbbb72b2..96531ab96 100644 --- a/src/imap/ngx_imap_auth_http_module.c +++ b/src/imap/ngx_imap_auth_http_module.c @@ -250,6 +250,12 @@ ngx_imap_auth_http_write_handler(ngx_event_t *wev) ngx_del_timer(wev); } + if (ngx_handle_write_event(wev, 0) == NGX_ERROR) { + ngx_close_connection(ctx->peer.connection); + ngx_destroy_pool(ctx->pool); + ngx_imap_session_internal_server_error(s); + } + return; } }