diff --git a/index.js b/index.js index a1dd40fe97..2307c79eae 100644 --- a/index.js +++ b/index.js @@ -59,7 +59,7 @@ function RedisClient(stream, options) { }); this.stream.on("error", function (msg) { - if (this.closing) { + if (self.closing) { return; }