Commit 63d8693
committed
fix: align error handler port validation with close callback
The error handler in reserveLoopbackPort only checked
addressDetails.port !== null && addressDetails.port > 0, while the
close callback used stricter validation (Number.isInteger, > 0,
<= 65535). This inconsistency meant an invalid port (non-integer or
out-of-range) could produce LoopbackPortReleaseError via the error
path but LoopbackPortAddressUnavailableError via the close path.
Apply the same strict validation in both places.1 parent bf8ca6a commit 63d8693
1 file changed
Lines changed: 4 additions & 1 deletion
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
| |||
0 commit comments