We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 327249c + fa09be5 commit 99f3939Copy full SHA for 99f3939
ngx_http_upstream_check_handler.c
@@ -544,10 +544,10 @@ ngx_http_check_send_handler(ngx_event_t *event)
544
size, ctx->send.last - ctx->send.pos);
545
#endif
546
547
- if (size >= 0) {
+ if (size > 0) {
548
ctx->send.pos += size;
549
550
- } else if (size == NGX_AGAIN) {
+ } else if (size == 0 || size == NGX_AGAIN) {
551
return;
552
553
} else {
@@ -659,6 +659,12 @@ ngx_http_check_recv_handler(ngx_event_t *event)
659
switch (rc) {
660
661
case NGX_AGAIN:
662
+ /* The peer has closed its half side of the connection. */
663
+ if (size == 0) {
664
+ ngx_http_check_status_update(peer, 0);
665
+ break;
666
+ }
667
+
668
669
670
case NGX_ERROR:
0 commit comments