| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
全 stream 模式写还是得再改改
Sorry, something went wrong.
|
|
||
| var ps = parseStream().pause(); | ||
| stream.pipe(ps); | ||
| if (this._isAllStreamSizeKnown) { |
There was a problem hiding this comment.
是否只需要 knownStreamSize 判断即可?
Sorry, something went wrong.
|
|
||
| this._streams.push([leading, ps]); | ||
| if (options) { | ||
| for (const k in options) { |
There was a problem hiding this comment.
直接assign 即可,不需要考虑老的代码
Sorry, something went wrong.
| }); | ||
|
|
||
| stream.on('data', data => { | ||
| this.push(data); |
There was a problem hiding this comment.
这样不对的,formstream 一旦开始读,下游消费很慢,然后导致子 stream 数据全部被塞到内存里面了。这里应该也是得走 readable 模式,主动去读
Sorry, something went wrong.
|
还需要管理传入来的 stream 异常情况 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is a big refactor.