Skip redundant log if r->ctx->err != NULL

pull/220/head
smititelu 10 years ago
parent 50aef804d9
commit 33e72ba67a

@ -212,9 +212,11 @@ done:
err3: err3:
freeReplyObject(rp); freeReplyObject(rp);
err2: err2:
if (r->ctx->err) if (r->ctx->err) {
rlog(LOG_ERR, "Redis %s error: %s", rlog(LOG_ERR, "Failed to connect to Redis %s, error: %s",
endpoint_print_buf(&r->endpoint), r->ctx->errstr); endpoint_print_buf(&r->endpoint), r->ctx->errstr);
return -1;
}
err: err:
rlog(LOG_ERR, "Failed to connect to Redis %s", rlog(LOG_ERR, "Failed to connect to Redis %s",
endpoint_print_buf(&r->endpoint)); endpoint_print_buf(&r->endpoint));

Loading…
Cancel
Save