Skip to content

Commit

Permalink
check active close from peer in ngx_http_check_recv_handler()
Browse files Browse the repository at this point in the history
 If there is no data to receive, we finish the health check before timeout.
 Note that, without this patch, timeout handler will do it for us.
  • Loading branch information
chobits committed Apr 8, 2013
1 parent 327249c commit 1999558
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ngx_http_upstream_check_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,12 @@ ngx_http_check_recv_handler(ngx_event_t *event)
switch (rc) {

case NGX_AGAIN:
/* The peer has closed its half side of the connection. */
if (size == 0) {
ngx_http_check_status_update(peer, 0);
break;
}

return;

case NGX_ERROR:
Expand Down

0 comments on commit 1999558

Please sign in to comment.