You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
Fix for [GH-127]
Re-initialize the reply parser for every new connection. If a connection is terminated, the parser could be left in a bad state. After the auto-reconnect magic kicks in, it tries to reuse the old parser, which will not work. This change is visible to client programs if you depend on client.reply_parser.name being set immediately. It will now only be set after a connection is established. Thanks to @jhurliman for reporting and @pietern for the fix suggestion.
This commit is contained in:
3
test.js
3
test.js
@@ -1194,10 +1194,9 @@ run_next_test = function run_next_test() {
|
||||
}
|
||||
};
|
||||
|
||||
console.log("Using reply parser " + client.reply_parser.name);
|
||||
|
||||
client.once("ready", function start_tests() {
|
||||
console.log("Connected to " + client.host + ":" + client.port + ", Redis server version " + client.server_info.redis_version + "\n");
|
||||
console.log("Using reply parser " + client.reply_parser.name);
|
||||
|
||||
run_next_test();
|
||||
|
||||
|
Reference in New Issue
Block a user