Mercurial > hg > nginx
comparison src/http/modules/perl/ngx_http_perl_module.c @ 913:90ce4d0e3241
fix ngx_http_perl_sleep_handler()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 13 Dec 2006 12:30:57 +0000 |
parents | 73c66ed9a9cd |
children | a5b9cdfe3e19 |
comparison
equal
deleted
inserted
replaced
912:7fa926a7926d | 913:90ce4d0e3241 |
---|---|
271 | 271 |
272 | 272 |
273 static void | 273 static void |
274 ngx_http_perl_sleep_handler(ngx_http_request_t *r) | 274 ngx_http_perl_sleep_handler(ngx_http_request_t *r) |
275 { | 275 { |
276 ngx_event_t *wev; | |
277 | |
276 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 278 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
277 "perl sleep handler"); | 279 "perl sleep handler"); |
278 | 280 |
279 ngx_http_perl_handle_request(r); | 281 wev = r->connection->write; |
282 | |
283 if (wev->timedout) { | |
284 wev->timedout = 0; | |
285 ngx_http_perl_handle_request(r); | |
286 return; | |
287 } | |
288 | |
289 if (ngx_handle_write_event(wev, 0) == NGX_ERROR) { | |
290 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | |
291 } | |
280 } | 292 } |
281 | 293 |
282 | 294 |
283 static ngx_int_t | 295 static ngx_int_t |
284 ngx_http_perl_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, | 296 ngx_http_perl_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, |