comparison src/event/ngx_event_connect.c @ 74:77969b24f355 NGINX_0_1_37

nginx 0.1.37 *) Change: now the "\n" is added to the end of the "nginx.pid" file. *) Bugfix: the responses may be transferred not completely, if many parts or the big parts were included by SSI. *) Bugfix: if all backends had returned the 404 reponse and the "http_404" parameter of the "proxy_next_upstream" or "fastcgi_next_upstream" directives was used, then nginx started to request all backends again.
author Igor Sysoev <http://sysoev.ru>
date Thu, 23 Jun 2005 00:00:00 +0400
parents b55cbf18157e
children e916a291e9aa
comparison
equal deleted inserted replaced
73:05310cdbd906 74:77969b24f355
374 return NGX_OK; 374 return NGX_OK;
375 } 375 }
376 376
377 377
378 void 378 void
379 ngx_event_connect_peer_failed(ngx_peer_connection_t *pc) 379 ngx_event_connect_peer_failed(ngx_peer_connection_t *pc, ngx_uint_t down)
380 { 380 {
381 time_t now; 381 time_t now;
382 382
383 now = ngx_time(); 383 if (down) {
384 384 now = ngx_time();
385 /* ngx_lock_mutex(pc->peers->mutex); */ 385
386 386 /* ngx_lock_mutex(pc->peers->mutex); */
387 pc->peers->peer[pc->cur_peer].fails++; 387
388 pc->peers->peer[pc->cur_peer].accessed = now; 388 pc->peers->peer[pc->cur_peer].fails++;
389 389 pc->peers->peer[pc->cur_peer].accessed = now;
390 /* ngx_unlock_mutex(pc->peers->mutex); */ 390
391 /* ngx_unlock_mutex(pc->peers->mutex); */
392 }
391 393
392 pc->cur_peer++; 394 pc->cur_peer++;
393 395
394 if (pc->cur_peer >= pc->peers->number) { 396 if (pc->cur_peer >= pc->peers->number) {
395 pc->cur_peer = 0; 397 pc->cur_peer = 0;