sentinelRedisInstance *ri = c->data;
redisReply *r;
- ri->pending_commands--;
- if (!reply) return;
+ if (ri) ri->pending_commands--;
+ if (!reply || !ri) return;
r = reply;
if (r->type == REDIS_REPLY_STRING) {
void sentinelDiscardReplyCallback(redisAsyncContext *c, void *reply, void *privdata) {
sentinelRedisInstance *ri = c->data;
- ri->pending_commands--;
+ if (ri) ri->pending_commands--;
}
void sentinelPingReplyCallback(redisAsyncContext *c, void *reply, void *privdata) {
sentinelRedisInstance *ri = c->data;
redisReply *r;
- ri->pending_commands--;
- if (!reply) return;
+ if (ri) ri->pending_commands--;
+ if (!reply || !ri) return;
r = reply;
if (r->type == REDIS_REPLY_STATUS ||
sentinelRedisInstance *ri = c->data;
redisReply *r;
- ri->pending_commands--;
- if (!reply) return;
+ if (ri) ri->pending_commands--;
+ if (!reply || !ri) return;
r = reply;
/* Only update pub_time if we actually published our message. Otherwise
sentinelRedisInstance *ri = c->data;
redisReply *r;
- if (!reply) return;
+ if (!reply || !ri) return;
r = reply;
/* Update the last activity in the pubsub channel. Note that since we
sentinelRedisInstance *ri = c->data;
redisReply *r;
- ri->pending_commands--;
- if (!reply) return;
+ if (ri) ri->pending_commands--;
+ if (!reply || !ri) return;
r = reply;
/* Ignore every error or unexpected reply.