Skip to content

Commit e0d0649

Browse files
author
Ruben Bridgewater
committed
Add fallback for node 0.10
Improve the fallback mode
1 parent 1eb30ad commit e0d0649

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@ var net = require("net"),
1313
connection_id = 0,
1414
default_port = 6379,
1515
default_host = "127.0.0.1",
16+
debug;
17+
18+
/* istanbul ignore next */
19+
if (util.debuglog) {
1620
debug = util.debuglog('redis');
21+
} else if (/\bredis\b/i.test(process.env.NODE_DEBUG)) {
22+
debug = console.error;
23+
} else {
24+
debug = function() {};
25+
}
1726

1827
// hiredis might not be installed
1928
try {

0 commit comments

Comments
 (0)