diff src/event/ngx_event_connect.c @ 94:c96cb248dc4b NGINX_0_2_1

nginx 0.2.1 *) Bugfix: if all backend using in load-balancing failed after one error, then nginx may got caught in an endless loop; bug appeared in 0.2.0.
author Igor Sysoev <http://sysoev.ru>
date Fri, 23 Sep 2005 00:00:00 +0400
parents 45945fa8b8ba
children dad2fe8ecf08
line wrap: on
line diff
--- a/src/event/ngx_event_connect.c
+++ b/src/event/ngx_event_connect.c
@@ -360,5 +360,7 @@ ngx_event_connect_peer_failed(ngx_peer_c
         pc->cur_peer = 0;
     }
 
-    pc->tries--;
+    if (pc->tries) {
+        pc->tries--;
+    }
 }