aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2024-01-18 19:12:38 +0400
committerRoman Arutyunyan <arut@nginx.com>2024-01-18 19:12:38 +0400
commit45e166b4a4a0e8d0e0f8adeb3438e4745261e8da (patch)
treedbc0d8eb8cc8410dd1b28fa04a5ae0a64a087cff /src
parentbd190d825ceeacf105a2392d88734f21df35d89a (diff)
downloadnginx-45e166b4a4a0e8d0e0f8adeb3438e4745261e8da.tar.gz
nginx-45e166b4a4a0e8d0e0f8adeb3438e4745261e8da.zip
Stream: moved fastopen compatibility check.
The move makes the code look similar to the corresponding code in http module.
Diffstat (limited to 'src')
-rw-r--r--src/stream/ngx_stream_core_module.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/stream/ngx_stream_core_module.c b/src/stream/ngx_stream_core_module.c
index 576a2fb16..3093963b7 100644
--- a/src/stream/ngx_stream_core_module.c
+++ b/src/stream/ngx_stream_core_module.c
@@ -1215,6 +1215,12 @@ ngx_stream_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
}
if (lsopt.type == SOCK_DGRAM) {
+#if (NGX_HAVE_TCP_FASTOPEN)
+ if (lsopt.fastopen != -1) {
+ return "\"fastopen\" parameter is incompatible with \"udp\"";
+ }
+#endif
+
if (backlog) {
return "\"backlog\" parameter is incompatible with \"udp\"";
}
@@ -1244,12 +1250,6 @@ ngx_stream_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
if (lsopt.proxy_protocol) {
return "\"proxy_protocol\" parameter is incompatible with \"udp\"";
}
-
-#if (NGX_HAVE_TCP_FASTOPEN)
- if (lsopt.fastopen != -1) {
- return "\"fastopen\" parameter is incompatible with \"udp\"";
- }
-#endif
}
for (n = 0; n < u.naddrs; n++) {