summaryrefslogtreecommitdiff
path: root/lib/zlib.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-10-24 12:48:58 -0700
committerisaacs <i@izs.me>2011-10-24 12:55:45 -0700
commit4c5751ba97763c7af866a5efe8505ffe1f830fdb (patch)
tree1c47f20d74e156918f8ec7a4891038c86d97e10e /lib/zlib.js
parent7ee29d1d5ba1655fa9f7a42afbe9ebf2f6e1c19f (diff)
downloadnode-4c5751ba97763c7af866a5efe8505ffe1f830fdb.tar.gz
Close #1929 zlib Respond to 'resume' events properly
Diffstat (limited to 'lib/zlib.js')
-rw-r--r--lib/zlib.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/zlib.js b/lib/zlib.js
index b7d3900a5..0b64dc2ed 100644
--- a/lib/zlib.js
+++ b/lib/zlib.js
@@ -254,6 +254,7 @@ Zlib.prototype._process = function() {
this._needDrain = false;
this.emit('drain');
}
+ // nothing to do, waiting for more data at this point.
return;
}
@@ -312,7 +313,7 @@ Zlib.prototype._process = function() {
var newReq = self._binding.write(self._flush,
chunk,
inOff,
- availInAfter,
+ availInBefore,
self._buffer,
self._offset,
self._chunkSize);
@@ -336,7 +337,7 @@ Zlib.prototype.pause = function() {
Zlib.prototype.resume = function() {
this._paused = false;
- this.emit('resume');
+ this._process();
};
util.inherits(Deflate, Zlib);