-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathredis_0.8.3_3.patch
32 lines (29 loc) · 1.2 KB
/
redis_0.8.3_3.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- node_modules/redis/index.js 2017-03-15 11:48:42.000000000 +0530
+++ node_modules/redis/index.js 2017-04-17 12:44:05.000000000 +0530
@@ -6,7 +6,8 @@
to_array = require("./lib/to_array"),
events = require("events"),
crypto = require("crypto"),
- contrailConfig = process.mainModule.exports["config"],
+ configUtils = require(process.mainModule.exports['corePath'] +
+ '/src/serverroot/common/config.utils'),
parsers = [], commands,
connection_id = 0,
default_port = 6379,
@@ -1128,15 +1129,16 @@
exports.createClient = function (port_arg, host_arg, options) {
var port = port_arg || default_port,
host = host_arg || default_host,
- redis_client, net_client;
+ redis_client, net_client,
+ config = configUtils.getConfig();
net_client = net.createConnection(port, host);
- if (undefined !== contrailConfig.redis_password) {
+ if (undefined !== config.redis_password) {
if (undefined === options) {
options = {};
}
- options['auth_pass'] = contrailConfig.redis_password;
+ options['auth_pass'] = config.redis_password;
}
redis_client = new RedisClient(net_client, options);