Repository navigation
Commit b5cab5b
committed
fix(api): respect backpressure when streaming asset downloads
toWebReadableStream read the source with on("data") and had no cancel
handler, so a slow or disconnected client caused the whole asset to be
read from disk/S3 and buffered. Use Readable.toWeb, which propagates
backpressure and destroys the source on cancel.1 parent 3e22b65 commit b5cab5b
1 file changed
Lines changed: 5 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
50 | 46 | | |
51 | 47 | | |
52 | 48 | | |
| |||
0 commit comments