Mercurial > hg > nginx
comparison src/http/ngx_http_event.c @ 93:738fe44c70d5
nginx-0.0.1-2003-05-21-17:28:21 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 21 May 2003 13:28:21 +0000 |
parents | 19cc647ecd91 |
children | 8220378432a8 |
comparison
equal
deleted
inserted
replaced
92:19cc647ecd91 | 93:738fe44c70d5 |
---|---|
994 ngx_hunk_t *h; | 994 ngx_hunk_t *h; |
995 ngx_event_t *rev, *wev; | 995 ngx_event_t *rev, *wev; |
996 ngx_connection_t *c; | 996 ngx_connection_t *c; |
997 ngx_http_log_ctx_t *ctx; | 997 ngx_http_log_ctx_t *ctx; |
998 ngx_http_core_main_conf_t *cmcf; | 998 ngx_http_core_main_conf_t *cmcf; |
999 ngx_http_core_loc_conf_t *clcf; | |
999 | 1000 |
1000 c = (ngx_connection_t *) r->connection; | 1001 c = (ngx_connection_t *) r->connection; |
1001 rev = c->read; | 1002 rev = c->read; |
1002 | 1003 |
1003 ctx = (ngx_http_log_ctx_t *) c->log->data; | 1004 ctx = (ngx_http_log_ctx_t *) c->log->data; |
1004 ctx->action = "closing request"; | 1005 ctx->action = "closing request"; |
1005 ngx_http_close_request(r, 0); | 1006 ngx_http_close_request(r, 0); |
1007 | |
1008 if (rev->timer_set) { | |
1009 ngx_del_timer(rev); | |
1010 } else { | |
1011 rev->timer_set = 1; | |
1012 } | |
1013 | |
1014 clcf = (ngx_http_core_loc_conf_t *) | |
1015 ngx_http_get_module_loc_conf(r, ngx_http_core_module_ctx); | |
1016 | |
1017 ngx_add_timer(rev, clcf->keepalive_timeout); | |
1006 | 1018 |
1007 if (rev->blocked && (ngx_event_flags & NGX_USE_LEVEL_EVENT)) { | 1019 if (rev->blocked && (ngx_event_flags & NGX_USE_LEVEL_EVENT)) { |
1008 if (ngx_add_event(rev, NGX_READ_EVENT, NGX_LEVEL_EVENT) == NGX_ERROR) { | 1020 if (ngx_add_event(rev, NGX_READ_EVENT, NGX_LEVEL_EVENT) == NGX_ERROR) { |
1009 ngx_http_close_connection(c); | 1021 ngx_http_close_connection(c); |
1010 return; | 1022 return; |