Conversation
On Windows GitHub Actions runners, binding Kestrel to 'localhost' fails because it attempts to bind to both 127.0.0.1 (IPv4) and ::1 (IPv6), and IPv6 socket creation is forbidden (SocketException 10013: WSAEACCES). Using '127.0.0.1' explicitly avoids the IPv6 bind attempt and makes the tests reliable on Windows CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This is an automated pull request from Repo Assist, an AI assistant for this repository.
Problem
The Windows CI build was failing with:
When Kestrel binds to
localhost, it tries to bind to both127.0.0.1(IPv4) and::1(IPv6). On Windows GitHub Actions runners, IPv6 socket creation is forbidden (WSAEACCES/ error 10013), causing the whole server startup to fail — and with it, any test that uses the local HTTP test server.This was causing 1 test failure out of 2847 in
FSharp.Data.Core.Testson Windows.Fix
Replace
(localhost/redacted) with(127.0.0.1/redacted) in the two test helpers that spin up a local Kestrel server:tests/FSharp.Data.Core.Tests/Http.fs—startHttpLocalServer()tests/FSharp.Data.Core.Tests/XmlExtensions.fs—startXmlHttpLocalServer()Using an explicit IPv4 address bypasses the dual-stack bind and works on all platforms.
Files changed
tests/FSharp.Data.Core.Tests/Http.fstests/FSharp.Data.Core.Tests/XmlExtensions.fsTest Status
Minimal two-line change in test infrastructure only. No production code changed. The fix directly addresses the error observed in CI run https://github.com/fsprojects/FSharp.Data/actions/runs/22380588390.