Mercurial > hg > nginx
comparison src/stream/ngx_stream.c @ 6169:f654addf0eea
Stream: fixed "reuseport" to actually work.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Fri, 05 Jun 2015 23:03:13 +0300 |
parents | 4f6efabcb09b |
children | c13091e6292c |
comparison
equal
deleted
inserted
replaced
6168:62869a9b2e7d | 6169:f654addf0eea |
---|---|
312 addr->ssl = listen->ssl; | 312 addr->ssl = listen->ssl; |
313 #endif | 313 #endif |
314 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) | 314 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) |
315 addr->ipv6only = listen->ipv6only; | 315 addr->ipv6only = listen->ipv6only; |
316 #endif | 316 #endif |
317 #if (NGX_HAVE_REUSEPORT) | |
318 addr->reuseport = listen->reuseport; | |
319 #endif | |
317 | 320 |
318 return NGX_OK; | 321 return NGX_OK; |
319 } | 322 } |
320 | 323 |
321 | 324 |
382 ls->keepcnt = addr[i].tcp_keepcnt; | 385 ls->keepcnt = addr[i].tcp_keepcnt; |
383 #endif | 386 #endif |
384 | 387 |
385 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) | 388 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) |
386 ls->ipv6only = addr[i].ipv6only; | 389 ls->ipv6only = addr[i].ipv6only; |
390 #endif | |
391 | |
392 #if (NGX_HAVE_REUSEPORT) | |
393 ls->reuseport = addr[i].reuseport; | |
387 #endif | 394 #endif |
388 | 395 |
389 stport = ngx_palloc(cf->pool, sizeof(ngx_stream_port_t)); | 396 stport = ngx_palloc(cf->pool, sizeof(ngx_stream_port_t)); |
390 if (stport == NULL) { | 397 if (stport == NULL) { |
391 return NGX_CONF_ERROR; | 398 return NGX_CONF_ERROR; |