aboutsummaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream_handler.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2016-01-20 19:52:12 +0300
committerRoman Arutyunyan <arut@nginx.com>2016-01-20 19:52:12 +0300
commit2ce791f2cddff967fd3bcbbedcd4ea283a9c77e1 (patch)
tree5f4426530cda21647392b3dace3f4248b0515d2e /src/stream/ngx_stream_handler.c
parentc790f9673d2f5730e17d2eb9d0a31b662a3d82f9 (diff)
downloadnginx-2ce791f2cddff967fd3bcbbedcd4ea283a9c77e1.tar.gz
nginx-2ce791f2cddff967fd3bcbbedcd4ea283a9c77e1.zip
Stream: UDP proxy.
Diffstat (limited to 'src/stream/ngx_stream_handler.c')
-rw-r--r--src/stream/ngx_stream_handler.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/stream/ngx_stream_handler.c b/src/stream/ngx_stream_handler.c
index b3edb684f..d59d0b0cc 100644
--- a/src/stream/ngx_stream_handler.c
+++ b/src/stream/ngx_stream_handler.c
@@ -52,7 +52,7 @@ ngx_stream_init_connection(ngx_connection_t *c)
* is the "*:port" wildcard so getsockname() is needed to determine
* the server address.
*
- * AcceptEx() already gave this address.
+ * AcceptEx() and recvmsg() already gave this address.
*/
if (ngx_connection_local_sockaddr(c, NULL, 0) != NGX_OK) {
@@ -166,7 +166,10 @@ ngx_stream_init_connection(ngx_connection_t *c)
}
}
- if (cscf->tcp_nodelay && c->tcp_nodelay == NGX_TCP_NODELAY_UNSET) {
+ if (c->type == SOCK_STREAM
+ && cscf->tcp_nodelay
+ && c->tcp_nodelay == NGX_TCP_NODELAY_UNSET)
+ {
ngx_log_debug0(NGX_LOG_DEBUG_STREAM, c->log, 0, "tcp_nodelay");
tcp_nodelay = 1;