Mercurial > hg > nginx
diff src/event/ngx_event_connect.c @ 525:09b42134ac0c release-0.1.37
nginx-0.1.37-RELEASE import
*) 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 <igor@sysoev.ru> |
---|---|
date | Thu, 23 Jun 2005 13:41:06 +0000 |
parents | 9b8c906f6e63 |
children | 371c1cee100d |
line wrap: on
line diff
--- a/src/event/ngx_event_connect.c Wed Jun 15 18:33:41 2005 +0000 +++ b/src/event/ngx_event_connect.c Thu Jun 23 13:41:06 2005 +0000 @@ -376,18 +376,20 @@ void -ngx_event_connect_peer_failed(ngx_peer_connection_t *pc) +ngx_event_connect_peer_failed(ngx_peer_connection_t *pc, ngx_uint_t down) { time_t now; - now = ngx_time(); + if (down) { + now = ngx_time(); - /* ngx_lock_mutex(pc->peers->mutex); */ + /* ngx_lock_mutex(pc->peers->mutex); */ - pc->peers->peer[pc->cur_peer].fails++; - pc->peers->peer[pc->cur_peer].accessed = now; + pc->peers->peer[pc->cur_peer].fails++; + pc->peers->peer[pc->cur_peer].accessed = now; - /* ngx_unlock_mutex(pc->peers->mutex); */ + /* ngx_unlock_mutex(pc->peers->mutex); */ + } pc->cur_peer++;