1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Add fallback for node 0.10

Improve the fallback mode
This commit is contained in:
Ruben Bridgewater
2015-09-02 21:19:38 +02:00
parent 1eb30add66
commit e0d0649c60

View File

@@ -13,7 +13,16 @@ var net = require("net"),
connection_id = 0,
default_port = 6379,
default_host = "127.0.0.1",
debug;
/* istanbul ignore next */
if (util.debuglog) {
debug = util.debuglog('redis');
} else if (/\bredis\b/i.test(process.env.NODE_DEBUG)) {
debug = console.error;
} else {
debug = function() {};
}
// hiredis might not be installed
try {