Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xuyang committed Jun 13, 2017
1 parent 1eb91c8 commit 6292f9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/monitors/redismonitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ var getMaster = function(self, redisNodes) {
ping(self, client, redis);
}, constants.TIME.DEFAULT_REDIS_PING);
} else {
client.disconnect();
client.end();
client = null;
}
});
});
client.on('error', function() {
logger.error('[redisMonitor] monitor redis connect error');
client.disconnect();
client.end();
client = null;
});
})(i);
Expand All @@ -203,7 +203,7 @@ var ping = function(self, client, rds) {
clearInterval(self.pingtimer);
if(self.pingtimer) {
logger.info('[redisMonitor] clear pingtimer timeout');
client.disconnect();
client.end();
client = null;
self.pingtimer = null;
rds.disconnect();
Expand Down

0 comments on commit 6292f9a

Please sign in to comment.