diff src/event/ngx_event_connect.c @ 545:0148586012ab release-0.2.1

nginx-0.2.1-RELEASE import *) Bugfix: if all backend using in load-balancing failed after one error, then nginx may got caught in an endless loop; the bug had appeared in 0.2.0.
author Igor Sysoev <igor@sysoev.ru>
date Fri, 23 Sep 2005 14:43:49 +0000
parents 511a89da35ad
children e48ebafc6939
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--;
+    }
 }