mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 06:03:31 -06:00
optimization
This commit is contained in:
parent
bfb23bf604
commit
47a1ebb050
@ -167,17 +167,14 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
|
||||
peers->number = n;
|
||||
peers->name = &us->host;
|
||||
|
||||
n = 0;
|
||||
|
||||
for (i = 0; i < u.naddrs; i++) {
|
||||
peers->peer[n].sockaddr = u.addrs[i].sockaddr;
|
||||
peers->peer[n].socklen = u.addrs[i].socklen;
|
||||
peers->peer[n].name = u.addrs[i].name;
|
||||
peers->peer[n].weight = 1;
|
||||
peers->peer[n].current_weight = 1;
|
||||
peers->peer[n].max_fails = 1;
|
||||
peers->peer[n].fail_timeout = 10;
|
||||
n++;
|
||||
peers->peer[i].sockaddr = u.addrs[i].sockaddr;
|
||||
peers->peer[i].socklen = u.addrs[i].socklen;
|
||||
peers->peer[i].name = u.addrs[i].name;
|
||||
peers->peer[i].weight = 1;
|
||||
peers->peer[i].current_weight = 1;
|
||||
peers->peer[i].max_fails = 1;
|
||||
peers->peer[i].fail_timeout = 10;
|
||||
}
|
||||
|
||||
us->peer.data = peers;
|
||||
|
Loading…
Reference in New Issue
Block a user