Commit cd6e704
committed
fix: executeStream uses pull() with cancel() — proper backpressure and reader cleanup
The RemoteExecutor.executeStream() ReadableStream had two issues:
1. Used start() to eagerly drain the upstream — no backpressure, reader
never released on error or early consumer cancellation.
2. Missing cancel() handler — if consumer broke out of `for await`,
the upstream reader kept reading with no way to stop.
Now uses pull()-based consumption (reads only when consumer requests)
and cancel() that calls reader.cancel() to release the upstream lock.1 parent fdf96a4 commit cd6e704
1 file changed
+26
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
281 | 280 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
288 | 287 | | |
| 288 | + | |
| 289 | + | |
289 | 290 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
| 291 | + | |
| 292 | + | |
296 | 293 | | |
297 | 294 | | |
298 | 295 | | |
| |||
306 | 303 | | |
307 | 304 | | |
308 | 305 | | |
| 306 | + | |
309 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
310 | 316 | | |
311 | | - | |
312 | 317 | | |
313 | 318 | | |
314 | 319 | | |
315 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
316 | 325 | | |
317 | 326 | | |
318 | 327 | | |
| |||
0 commit comments