| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f05a61d commit 3f54c8b
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1233,9 +1233,6 @@ function nReadingNextTick(self) { | |||
| 1233 | 1233 | // If the user uses them, then switch into old mode. | |
| 1234 | 1234 | Readable.prototype.resume = function() { | |
| 1235 | 1235 | const state = this._readableState; | |
| 1236 | - if ((state[kState] & kDestroyed) !== 0) { | ||
| 1237 | - return this; | ||
| 1238 | - } | ||
| 1239 | 1236 | if ((state[kState] & kFlowing) === 0) { | |
| 1240 | 1237 | debug('resume'); | |
| 1241 | 1238 | // We flow only if there is no one listening | |
@@ -1276,9 +1273,6 @@ function resume_(stream, state) { | |||
| 1276 | 1273 | ||
| 1277 | 1274 | Readable.prototype.pause = function() { | |
| 1278 | 1275 | const state = this._readableState; | |
| 1279 | - if ((state[kState] & kDestroyed) !== 0) { | ||
| 1280 | - return this; | ||
| 1281 | - } | ||
| 1282 | 1276 | debug('call pause'); | |
| 1283 | 1277 | if ((state[kState] & (kHasFlowing | kFlowing)) !== kHasFlowing) { | |
| 1284 | 1278 | debug('pause'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -118,13 +118,3 @@ const http = require('http'); | |||
| 118 | 118 | req.end('asd'); | |
| 119 | 119 | })); | |
| 120 | 120 | } | |
| 121 | - | ||
| 122 | - { | ||
| 123 | - // resume() and pause() should be no-ops on destroyed streams. | ||
| 124 | - const r = new Readable({ read() {} }); | ||
| 125 | - r.destroy(); | ||
| 126 | - r.on('resume', common.mustNotCall()); | ||
| 127 | - r.on('pause', common.mustNotCall()); | ||
| 128 | - r.resume(); | ||
| 129 | - r.pause(); | ||
| 130 | - } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments