| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent eaaaa0d commit 354fba1
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1856,8 +1856,9 @@ a [Readable][] stream. | |||
| 1856 | 1856 | process.stdin.setEncoding('utf8'); | |
| 1857 | 1857 | ||
| 1858 | 1858 | process.stdin.on('readable', () => { | |
| 1859 | - const chunk = process.stdin.read(); | ||
| 1860 | - if (chunk !== null) { | ||
| 1859 | + let chunk; | ||
| 1860 | + // Use a loop to make sure we read all available data. | ||
| 1861 | + while ((chunk = process.stdin.read()) !== null) { | ||
| 1861 | 1862 | process.stdout.write(`data: ${chunk}`); | |
| 1862 | 1863 | } | |
| 1863 | 1864 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments