diff options
| author | Ruslan Ermilov <ru@nginx.com> | 2021-02-01 16:42:50 +0300 |
|---|---|---|
| committer | Ruslan Ermilov <ru@nginx.com> | 2021-02-01 16:42:50 +0300 |
| commit | 327e21c43293ecfdbd116bd572ee08b7d8066b24 (patch) | |
| tree | 3505cfd69ebf0e7a3f1756d4d055b6e6218a372a | |
| parent | 56f53316837271a8cbb1d99f638e28d268a00d45 (diff) | |
| download | nginx-327e21c43293ecfdbd116bd572ee08b7d8066b24.tar.gz nginx-327e21c43293ecfdbd116bd572ee08b7d8066b24.tar.bz2 | |
HTTP/2: lingering close changed to handle NGX_AGAIN.
This part somehow slipped away from c5840ca2063d.
While it is not expected to be needed in case of lingering close,
it is good to keep it for correctness (see 2b5528023f6b).
| -rw-r--r-- | src/http/v2/ngx_http_v2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c index 77b60d42e..7c1ba597f 100644 --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -807,6 +807,10 @@ ngx_http_v2_lingering_close_handler(ngx_event_t *rev) ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, "lingering read: %z", n); + if (n == NGX_AGAIN) { + break; + } + if (n == NGX_ERROR || n == 0) { ngx_http_close_connection(c); return; |
