Skip to content

Commit

Permalink
Merge pull request #162 from mtlima/down-slave
Browse files Browse the repository at this point in the history
Discard slave if flagged with s_down or o_down
  • Loading branch information
luin committed Sep 29, 2015
2 parents 589b484 + 076cb21 commit d79913c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/connectors/sentinel_connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ SentinelConnector.prototype.resolveSlave = function (client, callback) {
var availableSlaves = [];
for (var i = 0; i < result.length; ++i) {
var slave = utils.packObject(result[i]);
if (slave.flags && slave.flags.indexOf('disconnected') === -1) {
if (slave.flags && !slave.flags.match(/(disconnected|s_down|o_down)/)) {
availableSlaves.push(slave);
}
}
Expand Down

0 comments on commit d79913c

Please sign in to comment.