Skip to content

Commit

Permalink
Attempt to fix issue sreeix#18
Browse files Browse the repository at this point in the history
  • Loading branch information
wankdanker committed Sep 4, 2014
1 parent 041d992 commit ea483e1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,21 @@ Server.prototype.sendCommand = function(command, id, cb){
return cb(err);
}
logger.debug('sending command to redis '+ command);
conn.write(command);

try {
conn.write(command, function (err) {
if (err) {
logger.error(err);
}
});
}
catch (e) {
logger.error(e);
//TODO: in this case we should either return that the command send failed
//or queue it until another redis server is available.

}

return cb(null, conn);
});
};
Expand Down

0 comments on commit ea483e1

Please sign in to comment.