You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
Fixed parser not being reset in case the redis connection
closed ASAP for overcoming of output buffer limits. Fixes #1190
This commit is contained in:
5
index.js
5
index.js
@@ -156,8 +156,6 @@ function RedisClient (options, stream) {
|
||||
this.buffers = options.return_buffers || options.detect_buffers;
|
||||
this.options = options;
|
||||
this.reply = 'ON'; // Returning replies is the default
|
||||
// Init parser
|
||||
this.reply_parser = create_parser(this);
|
||||
this.create_stream();
|
||||
// The listeners will not be attached right away, so let's print the deprecation message while the listener is attached
|
||||
this.on('newListener', function (event) {
|
||||
@@ -230,6 +228,9 @@ function create_parser (self) {
|
||||
RedisClient.prototype.create_stream = function () {
|
||||
var self = this;
|
||||
|
||||
// Init parser
|
||||
this.reply_parser = create_parser(this);
|
||||
|
||||
if (this.options.stream) {
|
||||
// Only add the listeners once in case of a reconnect try (that won't work)
|
||||
if (this.stream) {
|
||||
|
Reference in New Issue
Block a user