Skip to content

Commit

Permalink
Solve test yielding in net_serve_requests (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
SnorlaxAssist authored Apr 11, 2024
1 parent 0d302cf commit 8220216
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/net/serve/requests.luau
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 8220216

Please sign in to comment.