diff --git a/src/ngx_http_upsync_module.c b/src/ngx_http_upsync_module.c index a3a553d..9aa6e17 100644 --- a/src/ngx_http_upsync_module.c +++ b/src/ngx_http_upsync_module.c @@ -1046,9 +1046,10 @@ ngx_http_upsync_del_peer(ngx_cycle_t *cycle, #if (NGX_HTTP_UPSTREAM_CHECK) ngx_http_upstream_check_delete_dynamic_peer( tmp_peers->name, &us->addrs[j]); - tmp_peers->peer[i].check_index = NGX_MAX_VALUE; #endif w -= tmp_peers->peer[i].weight; + tmp_peers->peer[i].down = NGX_MAX_VALUE; + break; } } @@ -2742,11 +2743,9 @@ ngx_http_upsync_del_delay_delete(ngx_event_t *event) if (tmp_peers != NULL) { for (i = 0; i < tmp_peers->number; i++) { -#if (NGX_HTTP_UPSTREAM_CHECK) - if (tmp_peers->peer[i].check_index != NGX_MAX_VALUE) { + if (tmp_peers->peer[i].down != NGX_MAX_VALUE) { continue; } -#endif saddr = tmp_peers->peer[i].sockaddr; if (saddr != NULL) {