Repository navigation
Give Winsock errors the IOErrorType of their errno - #637
Open
kazu-yamamoto wants to merge 3 commits into
Open
kazu-yamamoto wants to merge 3 commits into
kazu-yamamoto wants to merge 3 commits into
Conversation
On Windows every socket error was OtherError. Each Winsock code now gets what errnoToIOError gives the errno of the same name, so a reset is ResourceVanished as on POSIX. WSAEINTR stays OtherError: it is what closesocket gives a blocked call, not an interrupt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An RST which beat the client's connect failed the connect itself on Linux, before recvWith was reached. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Ports #632 from v3.2 to master: on Windows, a Winsock error gets the
IOErrorTypeof the errno of the same name, rather thanOtherError.The cherry-pick conflicted only in the test's imports. On master the Windows
import GHC.IO.Exception (IOErrorType(..))inNetwork/Socket/Internal.hswas then unused, so the second commit drops it.Tested on Windows 11 with GHC 9.12.4.20260713 under WinIO and under MIO, and with GHC 9.8.2: 115 examples, 0 failures each, and no compiler warnings beyond those master already has. macOS: 119 examples, 0 failures.
🤖 Generated with Claude Code