Permalink
Browse files

fix error event

  • Loading branch information...
1 parent 5d2eca8 commit fb00e7bd74da9c62c99bc0ba27d4b4d14a00e0f6 @dead-horse dead-horse committed Mar 18, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/multi_redis.js
View
@@ -76,14 +76,12 @@ function MultiRedis(options) {
}
}
self.emit('end', client);
- })
+ });
client.on('error', function(err) {
- if (options.debug && (err.message&&err.message.indexOf('connect ECONNREFUSED') < 0)) {
- console.log(err.message);
- } else {
+ if (err.message&&err.message.indexOf('connect ECONNREFUSED') < 0) {
self.emit('error', err);
}
- })
+ });
client.on("connect", function() {
for(var i=0, len=self.clients.length; i!=len; ++i) {
if(self.clients[i]===client) return;

0 comments on commit fb00e7b

Please sign in to comment.