diff options
author | Ruslan Ermilov <ru@nginx.com> | 2015-06-05 23:03:13 +0300 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2015-06-05 23:03:13 +0300 |
commit | 14ddadb9acd8d2c0872d83de6f1c98ab5ed98613 (patch) | |
tree | 269dd2fc62ad41a3f1203e58574e7bd88aa6518e /src/stream/ngx_stream.c | |
parent | 413158330abf082d1c0b48b264090f3bf4e4305e (diff) | |
download | nginx-14ddadb9acd8d2c0872d83de6f1c98ab5ed98613.tar.gz nginx-14ddadb9acd8d2c0872d83de6f1c98ab5ed98613.zip |
Stream: fixed "reuseport" to actually work.
Diffstat (limited to 'src/stream/ngx_stream.c')
-rw-r--r-- | src/stream/ngx_stream.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stream/ngx_stream.c b/src/stream/ngx_stream.c index 1c5e7a87c..b0889e4d6 100644 --- a/src/stream/ngx_stream.c +++ b/src/stream/ngx_stream.c @@ -314,6 +314,9 @@ found: #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) addr->ipv6only = listen->ipv6only; #endif +#if (NGX_HAVE_REUSEPORT) + addr->reuseport = listen->reuseport; +#endif return NGX_OK; } @@ -386,6 +389,10 @@ ngx_stream_optimize_servers(ngx_conf_t *cf, ngx_array_t *ports) ls->ipv6only = addr[i].ipv6only; #endif +#if (NGX_HAVE_REUSEPORT) + ls->reuseport = addr[i].reuseport; +#endif + stport = ngx_palloc(cf->pool, sizeof(ngx_stream_port_t)); if (stport == NULL) { return NGX_CONF_ERROR; |