Skip to content

Commit

Permalink
Fixing the bad failover bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sreeix committed Apr 23, 2012
1 parent c012f99 commit 28245d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1 +1,2 @@
dump.rdb
dump.rdb
npm-debug.log
3 changes: 2 additions & 1 deletion lib/redis_proxy.js
Expand Up @@ -59,7 +59,8 @@ RedisProxy.prototype.readyup = function(active){
active.slavenone();
_.each(this.allServers, function (s){
if(!_.isEqual(s, active)){
s.client.slaveof(active.host, active.port, redis.print);
winston.info('Marking '+ s.client.port + ' as slave of '+ active.client.port);
s.client.slaveof(active.client.host, active.client.port, redis.print);
}
});
};
Expand Down

0 comments on commit 28245d2

Please sign in to comment.