Skip to content

Commit

Permalink
Update ngx_zookeeper_upstream_module.c
Browse files Browse the repository at this point in the history
  • Loading branch information
ZigzagAK authored Aug 10, 2023
1 parent 24c74e2 commit 6bee269
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ngx_zookeeper_upstream_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,8 @@ ngx_zookeeper_sync_watch(zhandle_t *zh, int type,

ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, 0,
"Zookeeper upstream: [%V] changed", &zscf->uscf->host);
zscf->epoch = 0;

zscf->epoch = zscf->busy ? -1 : 0;
ngx_zookeeper_sync_update(zscf);
}
}
Expand Down Expand Up @@ -1632,7 +1633,6 @@ ngx_zookeeper_sync_update(ngx_http_zookeeper_upstream_srv_conf_t *zscf)

if (zscf->busy) {

zscf->epoch = -1;
ngx_rwlock_unlock(&zscf->rwlock);
return NGX_OK;
}
Expand Down

0 comments on commit 6bee269

Please sign in to comment.