Mercurial > hg > nginx
comparison src/http/modules/ngx_http_upstream_ip_hash_module.c @ 5706:a2bf26774cd3
Upstream: fix tries check in ip_hash.
Make two checks for maximum number of tries consistent.
The other one checks '>' condition.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Fri, 23 May 2014 13:47:05 +0400 |
parents | 741aa3fde496 |
children | 6ff0ebd6fbf4 |
comparison
equal
deleted
inserted
replaced
5705:d5b8ee9f2201 | 5706:a2bf26774cd3 |
---|---|
229 | 229 |
230 pc->tries--; | 230 pc->tries--; |
231 | 231 |
232 next: | 232 next: |
233 | 233 |
234 if (++iphp->tries >= 20) { | 234 if (++iphp->tries > 20) { |
235 return iphp->get_rr_peer(pc, &iphp->rrp); | 235 return iphp->get_rr_peer(pc, &iphp->rrp); |
236 } | 236 } |
237 } | 237 } |
238 | 238 |
239 iphp->rrp.current = p; | 239 iphp->rrp.current = p; |