Skip to content

Commit

Permalink
Don't update opcounter in single mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Rodriguez committed Jul 24, 2012
1 parent bed084d commit c055b89
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,14 @@ commands.forEach(function(k) {
});

RedisHAClient.prototype.incrOpcounter = function(count, done) {
if (typeof count == 'function') {
if (typeof count == 'function') {
done = count;
count = 1;
}
if (this.options.single_mode) {
done();
return;
}
var master = this.master;
// For write operations, increment an op counter, to judge freshness of slaves.
if (!master.opcounterClient) {
Expand Down

0 comments on commit c055b89

Please sign in to comment.