diff options
author | Roman Arutyunyan <arut@nginx.com> | 2023-04-06 15:39:48 +0400 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2023-04-06 15:39:48 +0400 |
commit | cc00acfe74237710163eec7aeb89cc7374441af4 (patch) | |
tree | dc8dd696329e90b39e33c93a8282f97b0fab6ec0 /src | |
parent | ba15b2af1bc130725a1069c5c263779db350e9b0 (diff) | |
download | nginx-cc00acfe74237710163eec7aeb89cc7374441af4.tar.gz nginx-cc00acfe74237710163eec7aeb89cc7374441af4.zip |
Stream: allow waiting on a blocked QUIC stream (ticket #2479).
Previously, waiting on a shared connection was not allowed, because the only
type of such connection was plain UDP. However, QUIC stream connections are
also shared since they share socket descriptor with the listen connection.
Meanwhile, it's perfectly normal to wait on such connections.
The issue manifested itself with stream write errors when the amount of data
exceeded stream buffer size or flow control. Now no error is triggered
and Stream write module is allowed to wait for buffer space to become available.
Diffstat (limited to 'src')
-rw-r--r-- | src/stream/ngx_stream_write_filter_module.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/stream/ngx_stream_write_filter_module.c b/src/stream/ngx_stream_write_filter_module.c index 07dc7b52e..d8a72f966 100644 --- a/src/stream/ngx_stream_write_filter_module.c +++ b/src/stream/ngx_stream_write_filter_module.c @@ -277,7 +277,12 @@ ngx_stream_write_filter(ngx_stream_session_t *s, ngx_chain_t *in, *out = chain; if (chain) { - if (c->shared) { + if (c->shared +#if (NGX_STREAM_QUIC) + && c->quic == NULL +#endif + ) + { ngx_log_error(NGX_LOG_ALERT, c->log, 0, "shared connection is busy"); return NGX_ERROR; |