unjs / get-port-please

๐Ÿ”Œ Get an available open port
MIT License
255 stars 13 forks source link

fix: skip port on any listen error #61

Closed pi0 closed 1 year ago

pi0 commented 1 year ago

๐Ÿ”— Linked issue

โ“ Type of change

๐Ÿ“š Description

Previously we were silently ignoring some specific listen errors (EINVAL and EADDRNOTAVAIL) mainly due to windows IPv6 issues. Now that error handling is better, i think it makes sense to avoid this and find and fix and possible root causes

(if this PR might introduce any regressions, i really apologize, please ping me in an issue to quickly check and fix!)

๐Ÿ“ Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #61 (990f1d5) into main (1501204) will increase coverage by 0.07%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #61      +/-   ##
==========================================
+ Coverage   85.13%   85.20%   +0.07%     
==========================================
  Files           5        5              
  Lines         370      365       -5     
  Branches       48       47       -1     
==========================================
- Hits          315      311       -4     
+ Misses         55       54       -1     
Files Changed Coverage ฮ”
src/_internal.ts 85.88% <100.00%> (+0.32%) :arrow_up: