From 8220216893d9726eff548e853ce97b420d585cdd Mon Sep 17 00:00:00 2001 From: Snorlax <57375992+SnorlaxAssist@users.noreply.github.com> Date: Thu, 11 Apr 2024 08:04:40 -0400 Subject: [PATCH] Solve test yielding in net_serve_requests (#177) --- tests/net/serve/requests.luau | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/net/serve/requests.luau b/tests/net/serve/requests.luau index c588992..275f356 100644 --- a/tests/net/serve/requests.luau +++ b/tests/net/serve/requests.luau @@ -91,6 +91,12 @@ local handle2 = net.serve(PORT, { end, }) +if process.os == "windows" then + -- In Windows, client cannot directly connect to `0.0.0.0`. + -- `0.0.0.0` is a non-routable meta-address. + URL_EXTERNAL = "http://localhost" +end + -- And any requests to that IP should succeed local response3 = net.request(`{URL_EXTERNAL}:{PORT}`).body assert(response3 ~= nil, "Invalid response from server")