Ticket #2479: quic-stream-block

File quic-stream-block, 1.4 KB (added by Roman Arutyunyan, 3 years ago)
Line 
1# HG changeset patch
2# User Roman Arutyunyan <arut@nginx.com>
3# Date 1680773648 -14400
4# Thu Apr 06 13:34:08 2023 +0400
5# Branch quic
6# Node ID 2b34e65f2d23a611e9da37adc721ae07deed32ed
7# Parent f68fdb01714121017a91a60370c074e59b730239
8Stream: allow waiting on a blocked QUIC stream (ticket #2479).
9
10Previously, waiting on a shared connection was not allowed, because the only
11type of such connection was plain UDP. However, QUIC stream connections are
12also shared since they share socket descriptor with the listen connection.
13Meanwhile, it's perfectly normal to wait on such connections.
14
15The issue manifested itself with stream write errors when the amount of data
16exceeded stream buffer size or flow control. Now no error is triggered
17and Stream write module is allowed to wait for buffer space to become available.
18
19diff --git a/src/stream/ngx_stream_write_filter_module.c b/src/stream/ngx_stream_write_filter_module.c
20--- a/src/stream/ngx_stream_write_filter_module.c
21+++ b/src/stream/ngx_stream_write_filter_module.c
22@@ -277,7 +277,12 @@ ngx_stream_write_filter(ngx_stream_sessi
23 *out = chain;
24
25 if (chain) {
26- if (c->shared) {
27+ if (c->shared
28+#if (NGX_STREAM_QUIC)
29+ && !c->quic
30+#endif
31+ )
32+ {
33 ngx_log_error(NGX_LOG_ALERT, c->log, 0,
34 "shared connection is busy");
35 return NGX_ERROR;