Sentinel: receive Pub/Sub messages from slaves.

This commit is contained in:
antirez 2013-11-12 23:07:33 +01:00
parent dfa5f8b777
commit 1569af1f23

View File

@ -1334,7 +1334,7 @@ void sentinelReconnectInstance(sentinelRedisInstance *ri) {
}
}
/* Pub / Sub */
if ((ri->flags & SRI_MASTER) && ri->pc == NULL) {
if ((ri->flags & (SRI_MASTER|SRI_SLAVE)) && ri->pc == NULL) {
ri->pc = redisAsyncConnect(ri->addr->ip,ri->addr->port);
if (ri->pc->err) {
sentinelEvent(REDIS_DEBUG,"-pubsub-link-reconnection",ri,"%@ #%s",