Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

zlib: Emit "end" instead of "close" for Z_STREAM_END

Emit "end" instead of "close" when Z_STREAM_END return value is
encountered. And remove emitting "end" in Zlib.end().
  • Loading branch information...
commit 3efc53209fc214c936c027f02587f21c5bcbfe1a 1 parent 45cb346
Yi EungJun authored

Showing 1 changed file with 1 addition and 2 deletions. Show diff stats Hide diff stats

  1. +1 2  lib/zlib.js
3  lib/zlib.js
@@ -346,7 +346,6 @@ Zlib.prototype.end = function end(chunk, cb) {
346 346 var self = this;
347 347 this._ending = true;
348 348 var ret = this.write(chunk, function() {
349   - self.emit('end');
350 349 if (cb) cb();
351 350 });
352 351 this._ended = true;
@@ -440,7 +439,7 @@ Zlib.prototype._process = function() {
440 439 self._process();
441 440
442 441 if (err == binding.Z_STREAM_END) {
443   - self.emit('close');
  442 + self.emit('end');
444 443 }
445 444 }
446 445 };

0 comments on commit 3efc532

Please sign in to comment.
Something went wrong with that request. Please try again.