Commit e8f704e
committed
Refactor: Move abort signal handling into streamProcessToLogger
Rather than having callers manually set up abort handlers and cleanup,
streamProcessToLogger now accepts an optional abortSignal and returns
a cleanup function. This centralizes the abort handling logic and makes
call sites cleaner.
Benefits:
- Reduces boilerplate at call sites
- Ensures consistent cleanup (no risk of forgetting removeEventListener)
- Single place to maintain abort handling logic
Addresses code review feedback.1 parent 7855eaa commit e8f704e
2 files changed
+26
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
| 566 | + | |
574 | 567 | | |
575 | 568 | | |
| 569 | + | |
576 | 570 | | |
577 | 571 | | |
578 | 572 | | |
| |||
581 | 575 | | |
582 | 576 | | |
583 | 577 | | |
584 | | - | |
| 578 | + | |
585 | 579 | | |
586 | 580 | | |
587 | 581 | | |
| |||
592 | 586 | | |
593 | 587 | | |
594 | 588 | | |
595 | | - | |
| 589 | + | |
596 | 590 | | |
597 | 591 | | |
598 | 592 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | | - | |
32 | | - | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
39 | 52 | | |
40 | 53 | | |
41 | 54 | | |
| |||
65 | 78 | | |
66 | 79 | | |
67 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
68 | 88 | | |
0 commit comments