Permalink
Browse files

Show error in debug mode during reconnection attempts, etc.

  • Loading branch information...
1 parent 53361b8 commit 8a30946f796cc50cb01ba68dac3b6df27860c76d @fictorial committed Jun 14, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/redis-client.js
View
@@ -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));

0 comments on commit 8a30946

Please sign in to comment.