diff --git a/index.js b/index.js index fe79c5f3935..2ad5f095d7e 100644 --- a/index.js +++ b/index.js @@ -220,7 +220,9 @@ RedisClient.prototype.create_stream = function () { }); this.stream.on('error', function (err) { - self.on_error(err); + process.nextTick(function () { + self.on_error(err); + }); }); this.stream.once('close', function (hadError) {