Stop watcher before calling .set() in Stream.prototype.resume

pull/22966/head
Ryan Dahl 2010-12-01 12:52:31 -08:00
parent 127f17a0ea
commit ec1589875c
1 changed files with 1 additions and 0 deletions

View File

@ -641,6 +641,7 @@ Stream.prototype.pause = function () {
Stream.prototype.resume = function () {
if (this.fd === null) throw new Error('Cannot resume() closed Stream.');
this._readWatcher.stop();
this._readWatcher.set(this.fd, true, false);
this._readWatcher.start();
};