Commit 8c32fe7
committed
fix: prevent null port from being misclassified as release error
When addressDetails.port is null, the ?? 0 coercion set releasePort to 0
(not undefined), causing the error handler to emit LoopbackPortReleaseError
on port 0 instead of allowing LoopbackPortAddressUnavailableError.
Only assign releasePort when the port is a valid positive number, keeping it
undefined otherwise so the error handler and close callback remain consistent.1 parent e234889 commit 8c32fe7
1 file changed
Lines changed: 10 additions & 15 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
235 | 238 | | |
236 | 239 | | |
237 | 240 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
252 | 247 | | |
253 | 248 | | |
254 | 249 | | |
| |||
0 commit comments