| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f17789a commit 4978689
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,12 +22,15 @@ const server = http2.createServer(); | |||
| 22 | 22 | server.on('stream', common.mustCall((stream) => { | |
| 23 | 23 | const dest = stream.pipe(fs.createWriteStream(fn)); | |
| 24 | 24 | ||
| 25 | - dest.on('finish', () => { | ||
| 25 | + stream.on('end', common.mustCall(() => { | ||
| 26 | + stream.respond(); | ||
| 27 | + stream.end(); | ||
| 28 | + })); | ||
| 29 | + | ||
| 30 | + dest.on('finish', common.mustCall(() => { | ||
| 26 | 31 | assert.strictEqual(fs.readFileSync(loc).length, | |
| 27 | 32 | fs.readFileSync(fn).length); | |
| 28 | - }); | ||
| 29 | - stream.respond(); | ||
| 30 | - stream.end(); | ||
| 33 | + })); | ||
| 31 | 34 | })); | |
| 32 | 35 | ||
| 33 | 36 | server.listen(common.PIPE, common.mustCall(() => { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments