Mercurial > hg > nginx
comparison src/http/modules/ngx_http_upstream_ip_hash_module.c @ 1418:acb1f441e7b2
update ip_hash to "backup" option
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 24 Aug 2007 15:30:35 +0000 |
parents | b23a80f9a7b8 |
children | 2e91aecb9e57 |
comparison
equal
deleted
inserted
replaced
1417:b23a80f9a7b8 | 1418:acb1f441e7b2 |
---|---|
138 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0, | 138 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0, |
139 "get ip hash peer, try: %ui", pc->tries); | 139 "get ip hash peer, try: %ui", pc->tries); |
140 | 140 |
141 /* TODO: cached */ | 141 /* TODO: cached */ |
142 | 142 |
143 if (iphp->tries > 20 || iphp->rrp.peers->number == 1) { | 143 if (iphp->tries > 20 || iphp->rrp.peers->single) { |
144 return iphp->get_rr_peer(pc, &iphp->rrp); | 144 return iphp->get_rr_peer(pc, &iphp->rrp); |
145 } | 145 } |
146 | 146 |
147 now = ngx_time(); | 147 now = ngx_time(); |
148 | 148 |