Commit f973722
committed
fix(cp): prevent WriteStream error handler from orphaning subsequent file's stream
When a WriteStream error fires asynchronously after we've moved on to processing
the next file, only nullify currentFile if it still points to the errored stream.
This prevents a race condition where a late-firing error could orphan the new file's stream.1 parent 4d5d2b1 commit f973722
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| 431 | + | |
431 | 432 | | |
432 | 433 | | |
433 | 434 | | |
434 | | - | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
435 | 440 | | |
436 | 441 | | |
437 | 442 | | |
| |||
0 commit comments