Commit 9ec7780
committed
fix: remove shot special-case; treat simulate.close as abort per maintainer guidance
Per feedback on #4579: a premature socket close (simulate.close or a real
TCP disconnect on Node.js v24+) is correctly treated as a client abort.
Remove the req._shot guard that was suppressing abort detection for shot
inject requests and update the test to expect 499 instead of 500.
The false branch of the final condition is structurally unreachable — after
all early returns, only 'abort' and 'close' events reach that point — so a
$lab:coverage:off$ annotation is used for the one unavoidable uncovered branch.1 parent 97b5795 commit 9ec7780
2 files changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
756 | 757 | | |
757 | 758 | | |
758 | 759 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
0 commit comments