Mercurial > hg > nginx
comparison src/http/v2/ngx_http_v2.c @ 7765:519b55453c45
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).
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 01 Feb 2021 16:42:50 +0300 |
parents | 7efae6b4cfb0 |
children | 3e83336cda5b |
comparison
equal
deleted
inserted
replaced
7764:ecc0ae881a25 | 7765:519b55453c45 |
---|---|
805 do { | 805 do { |
806 n = c->recv(c, buffer, NGX_HTTP_LINGERING_BUFFER_SIZE); | 806 n = c->recv(c, buffer, NGX_HTTP_LINGERING_BUFFER_SIZE); |
807 | 807 |
808 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, "lingering read: %z", n); | 808 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, "lingering read: %z", n); |
809 | 809 |
810 if (n == NGX_AGAIN) { | |
811 break; | |
812 } | |
813 | |
810 if (n == NGX_ERROR || n == 0) { | 814 if (n == NGX_ERROR || n == 0) { |
811 ngx_http_close_connection(c); | 815 ngx_http_close_connection(c); |
812 return; | 816 return; |
813 } | 817 } |
814 | 818 |