aboutsummaryrefslogtreecommitdiff
path: root/src/imap/ngx_imap_auth_http_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/imap/ngx_imap_auth_http_module.c')
-rw-r--r--src/imap/ngx_imap_auth_http_module.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/imap/ngx_imap_auth_http_module.c b/src/imap/ngx_imap_auth_http_module.c
index e66593a4a..2bf0cc96c 100644
--- a/src/imap/ngx_imap_auth_http_module.c
+++ b/src/imap/ngx_imap_auth_http_module.c
@@ -516,13 +516,14 @@ ngx_imap_auth_http_process_headers(ngx_imap_session_t *s,
ngx_close_connection(ctx->peer.connection);
if (ctx->err.len) {
- (void) ngx_send(s->connection, ctx->err.data, ctx->err.len);
+ s->out = ctx->err;
if (ctx->sleep == 0) {
- ngx_imap_close_connection(s->connection);
- return;
+ s->quit = 1;
}
+ ngx_imap_send(s->connection->write);
+
ngx_add_timer(s->connection->read, ctx->sleep * 1000);
s->connection->read->handler = ngx_imap_auth_sleep_handler;