aboutsummaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream_core_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream/ngx_stream_core_module.c')
-rw-r--r--src/stream/ngx_stream_core_module.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/stream/ngx_stream_core_module.c b/src/stream/ngx_stream_core_module.c
index 246f55c45..b02e5ca5a 100644
--- a/src/stream/ngx_stream_core_module.c
+++ b/src/stream/ngx_stream_core_module.c
@@ -45,6 +45,13 @@ static ngx_command_t ngx_stream_core_commands[] = {
0,
NULL },
+ { ngx_string("tcp_nodelay"),
+ NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_FLAG,
+ ngx_conf_set_flag_slot,
+ NGX_STREAM_SRV_CONF_OFFSET,
+ offsetof(ngx_stream_core_srv_conf_t, tcp_nodelay),
+ NULL },
+
ngx_null_command
};
@@ -122,6 +129,7 @@ ngx_stream_core_create_srv_conf(ngx_conf_t *cf)
cscf->file_name = cf->conf_file->file.name.data;
cscf->line = cf->conf_file->line;
+ cscf->tcp_nodelay = NGX_CONF_UNSET;
return cscf;
}
@@ -148,6 +156,8 @@ ngx_stream_core_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
}
}
+ ngx_conf_merge_value(conf->tcp_nodelay, prev->tcp_nodelay, 1);
+
return NGX_CONF_OK;
}