Skip to content

Commit

Permalink
fix possible problem when zookeeper connection lost
Browse files Browse the repository at this point in the history
  • Loading branch information
ZigzagAK committed Apr 27, 2019
1 parent 01127a4 commit a93bf3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ngx_zookeeper_upstream_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,11 +1091,11 @@ ngx_zookeeper_ctx_deref(ngx_zookeeper_path_ctx_t *ctx)
if (count != 0)
return;

ngx_zookeeper_remove_obsoleted(ctx->cfg, ctx->names);

if (ctx->errors)
if (ctx->errors != 0)
goto cleanup;

ngx_zookeeper_remove_obsoleted(ctx->cfg, ctx->names);

if (ctx->cfg->zscf->file.data != NULL)
ngx_zookeeper_upstream_save(ctx->cfg);

Expand Down

0 comments on commit a93bf3d

Please sign in to comment.