summaryrefslogtreecommitdiff
path: root/lib/zlib.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/zlib.js')
-rw-r--r--lib/zlib.js19
1 files changed, 1 insertions, 18 deletions
diff --git a/lib/zlib.js b/lib/zlib.js
index e81559dc9f..409286bc14 100644
--- a/lib/zlib.js
+++ b/lib/zlib.js
@@ -309,24 +309,7 @@ Zlib.prototype.reset = function reset() {
};
Zlib.prototype._flush = function(output, callback) {
- var rs = this._readableState;
- var self = this;
- this._transform(null, output, function(er) {
- if (er)
- return callback(er);
-
- // now a weird thing happens... it could be that you called flush
- // but everything had already actually been consumed, but it wasn't
- // enough to get over the Readable class's lowWaterMark.
- // In that case, we emit 'readable' now to make sure it's consumed.
- if (rs.length &&
- rs.length < rs.lowWaterMark &&
- !rs.ended &&
- rs.needReadable)
- self.emit('readable');
-
- callback();
- });
+ this._transform(null, output, callback);
};
Zlib.prototype.flush = function(callback) {