Skip to content

Use WSAGetLastError for UDP send errors on Windows#3629

Merged
gabime merged 1 commit into
gabime:v1.xfrom
sage-mode-hunter:fix-windows-udp-send-errors
Jun 27, 2026
Merged

Use WSAGetLastError for UDP send errors on Windows#3629
gabime merged 1 commit into
gabime:v1.xfrom
sage-mode-hunter:fix-windows-udp-send-errors

Conversation

@sage-mode-hunter

Copy link
Copy Markdown
Contributor

Summary

This change updates the Windows UDP client to use WSAGetLastError() when sendto() fails.

Winsock APIs report socket errors through WSAGetLastError(), while the current implementation uses errno, which may produce an incorrect or misleading error message. This change uses the existing throw_winsock_error_() helper so that the reported exception contains the actual Winsock error.

@gabime gabime merged commit 8671ca4 into gabime:v1.x Jun 27, 2026
14 checks passed
@gabime

gabime commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Thanks @sage-mode-hunter

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.

2 participants