Mercurial > hg > nginx-quic
comparison src/stream/ngx_stream_upstream_round_robin.c @ 6706:829468da49d6
Stream: style.
Explicitly initialized peer's max_conns for upstreams created with
variables similar to how it's done in http.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 29 Sep 2016 12:59:13 +0300 |
parents | 29bf0dbc0a77 |
children | fd5c2781460b |
comparison
equal
deleted
inserted
replaced
6705:29bf0dbc0a77 | 6706:829468da49d6 |
---|---|
345 peer[0].socklen = ur->socklen; | 345 peer[0].socklen = ur->socklen; |
346 peer[0].name = ur->host; | 346 peer[0].name = ur->host; |
347 peer[0].weight = 1; | 347 peer[0].weight = 1; |
348 peer[0].effective_weight = 1; | 348 peer[0].effective_weight = 1; |
349 peer[0].current_weight = 0; | 349 peer[0].current_weight = 0; |
350 peer[0].max_conns = 0; | |
350 peer[0].max_fails = 1; | 351 peer[0].max_fails = 1; |
351 peer[0].fail_timeout = 10; | 352 peer[0].fail_timeout = 10; |
352 peers->peer = peer; | 353 peers->peer = peer; |
353 | 354 |
354 } else { | 355 } else { |
378 peer[i].name.len = len; | 379 peer[i].name.len = len; |
379 peer[i].name.data = p; | 380 peer[i].name.data = p; |
380 peer[i].weight = 1; | 381 peer[i].weight = 1; |
381 peer[i].effective_weight = 1; | 382 peer[i].effective_weight = 1; |
382 peer[i].current_weight = 0; | 383 peer[i].current_weight = 0; |
384 peer[i].max_conns = 0; | |
383 peer[i].max_fails = 1; | 385 peer[i].max_fails = 1; |
384 peer[i].fail_timeout = 10; | 386 peer[i].fail_timeout = 10; |
385 *peerp = &peer[i]; | 387 *peerp = &peer[i]; |
386 peerp = &peer[i].next; | 388 peerp = &peer[i].next; |
387 } | 389 } |