Notably, it is to avoid setting the TCP_NODELAY flag for QUIC streams
in ngx_http_upstream_send_response(). It is an invalid operation on
inherently SOCK_DGRAM sockets, which leads to QUIC connection close.
The change reduces diff to the default branch in stream content phase.
sc->local_sockaddr = c->local_sockaddr;
sc->local_socklen = c->local_socklen;
sc->number = ngx_atomic_fetch_add(ngx_connection_counter, 1);
+ sc->tcp_nodelay = NGX_TCP_NODELAY_DISABLED;
sc->recv = ngx_quic_stream_recv;
sc->send = ngx_quic_stream_send;
cscf = ngx_stream_get_module_srv_conf(s, ngx_stream_core_module);
if (c->type == SOCK_STREAM
-#if (NGX_STREAM_QUIC)
- && c->quic == NULL
-#endif
&& cscf->tcp_nodelay
&& ngx_tcp_nodelay(c) != NGX_OK)
{