Skip to content

Use FormatMessage directly for Winsock errors - #9384

Merged
nbolton merged 1 commit into
masterfrom
winsock-errors
Jan 22, 2026
Merged

Use FormatMessage directly for Winsock errors#9384
nbolton merged 1 commit into
masterfrom
winsock-errors

Conversation

@nbolton

@nbolton nbolton commented Jan 22, 2026

Copy link
Copy Markdown
Member

Description

Uses FormatMessage for Winsock errors instead of hard-coding them.

Related Issue

Based on: #9337

May fix: #9067 (but needs testing)

How Has This Been Tested?

Not yet tested, Winsock errors are hard to reproduce.

We should wait until a user confirms that this fixes the issue (I am not in a rush to merge this).

CC @benrg

@nbolton
nbolton requested a review from a team January 22, 2026 13:24
@nbolton
nbolton requested a review from sithlord48 as a code owner January 22, 2026 13:24
@nbolton nbolton changed the title refactor: use windowsErrorToString instead of obsolete winsockErrorToString UseFormatMessage for Winsock errors instead of hard-coding them Jan 22, 2026
@nbolton nbolton changed the title UseFormatMessage for Winsock errors instead of hard-coding them Use FormatMessage directly for Winsock errors Jan 22, 2026

@sithlord48 sithlord48 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love to see unneeded code go !!!

@nbolton

nbolton commented Jan 22, 2026

Copy link
Copy Markdown
Member Author

We should wait until a user confirms that this fixes the issue (I am not in a rush to merge this).

@sithlord48 ☝️ - Do you agree?

@sithlord48

sithlord48 commented Jan 22, 2026

Copy link
Copy Markdown
Member

No i think this is good since we will now just report the winstock "default" error string not our own like we used to .

@nbolton
nbolton merged commit 3a242e7 into master Jan 22, 2026
34 checks passed
@nbolton
nbolton deleted the winsock-errors branch January 22, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom messages for Winsock error codes are sometimes wrong

2 participants