mirror of
https://github.com/nginx/nginx.git
synced 2025-06-19 02:40:49 +08:00
Stream: moved fastopen compatibility check.
The move makes the code look similar to the corresponding code in http module.
This commit is contained in:
parent
bd190d825c
commit
45e166b4a4
@ -1215,6 +1215,12 @@ ngx_stream_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lsopt.type == SOCK_DGRAM) {
|
if (lsopt.type == SOCK_DGRAM) {
|
||||||
|
#if (NGX_HAVE_TCP_FASTOPEN)
|
||||||
|
if (lsopt.fastopen != -1) {
|
||||||
|
return "\"fastopen\" parameter is incompatible with \"udp\"";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (backlog) {
|
if (backlog) {
|
||||||
return "\"backlog\" parameter is incompatible with \"udp\"";
|
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) {
|
if (lsopt.proxy_protocol) {
|
||||||
return "\"proxy_protocol\" parameter is incompatible with \"udp\"";
|
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++) {
|
for (n = 0; n < u.naddrs; n++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user