Skip to content

Commit

Permalink
Show error in debug mode during reconnection attempts, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
fictorial committed Jun 14, 2010
1 parent 53361b8 commit 8a30946
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/redis-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,11 @@ function Client(stream, options) {
client.emit(eventName, client);
});

stream.addListener('error', function (e) {
if (exports.debugMode)
sys.debug("[ERROR] Connection to redis encountered an error: " + e);
});

stream.addListener("data", function (buffer) {
if (exports.debugMode)
sys.debug("[RECV] " + debugFilter(buffer));
Expand Down

0 comments on commit 8a30946

Please sign in to comment.