Permalink
Browse files

Don't update opcounter in single mode

  • Loading branch information...
1 parent bed084d commit c055b893d2b129909c15a1029373312ac06abc79 Carlos Rodriguez committed Jul 24, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 index.js
View
@@ -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) {

0 comments on commit c055b89

Please sign in to comment.