mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-15 22:08:03 +00:00
testPortOnAllHosts ran the four host probes (127.0.0.1 / 0.0.0.0 / ::1 / ::) in parallel via Promise.all. The first bind on 127.0.0.1 held its socket open until server.close() resolved on the next event-loop tick, and while it was open the wildcard 0.0.0.0 / :: probes raced it and got EADDRINUSE. Result: every port in the 3002–3101 scan range looked occupied and the preview server refused to start — deterministic on Linux (Crostini on ChromeOS in the reporting environment, gigadeniga's issue #309). Fix is to test the hosts sequentially so each probe's socket is fully closed before the next opens. The multi-host check itself stays — it's load-bearing for devbox / SSH-forwarding layouts where a port is free on loopback but held on the wildcard. Regression tests bind real sockets (no mocks) and would have failed against the parallel implementation on any Linux shard.