aboutsummaryrefslogtreecommitdiff
path: root/src/imap/ngx_imap_handler.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-09-13 16:18:09 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-09-13 16:18:09 +0000
commit0292cbbe35cc6296a3128315a9a982fa2aa6832b (patch)
tree595e5e0ad5b6d904d327f550398b31c34a932cad /src/imap/ngx_imap_handler.c
parent32e5771747809a31ed245a3299fefe19ace03ce6 (diff)
downloadnginx-0292cbbe35cc6296a3128315a9a982fa2aa6832b.tar.gz
nginx-0292cbbe35cc6296a3128315a9a982fa2aa6832b.zip
nginx-0.0.10-2004-09-13-20:18:09 import
Diffstat (limited to 'src/imap/ngx_imap_handler.c')
-rw-r--r--src/imap/ngx_imap_handler.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/imap/ngx_imap_handler.c b/src/imap/ngx_imap_handler.c
index f9e3983a2..6c97416d0 100644
--- a/src/imap/ngx_imap_handler.c
+++ b/src/imap/ngx_imap_handler.c
@@ -58,7 +58,11 @@ static void ngx_imap_init_session(ngx_event_t *rev)
c = rev->data;
- /* TODO: timeout */
+ if (rev->timedout) {
+ ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT, "client timed out");
+ ngx_imap_close_connection(c);
+ return;
+ }
if (!(s = ngx_pcalloc(c->pool, sizeof(ngx_imap_session_t)))) {
ngx_imap_close_connection(c);
@@ -102,7 +106,11 @@ static void ngx_pop3_auth_state(ngx_event_t *rev)
ngx_log_debug0(NGX_LOG_DEBUG_IMAP, c->log, 0, "pop3 auth state");
- /* TODO: timeout */
+ if (rev->timedout) {
+ ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT, "client timed out");
+ ngx_imap_close_connection(c);
+ return;
+ }
rc = ngx_pop3_read_command(s);