mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
Previously the tests tries to use UDP ports to fabricate ECONNREFUSED which is incorrect - UDP ports use different namespaces, so the port can have valid TCP listeners. This patch updates the test to fabricate the ECONNREFUSED error by using the port of a recently closed HTTP server. If the ephemeral port happens to be still open, try to get a different one until we succeed. PR-URL: https://github.com/nodejs/node/pull/59476 Refs: https://github.com/nodejs/reliability/issues/1287 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
1.9 KiB
1.9 KiB