Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Socket#close error handling on Windows #14517

Merged

Conversation

HertzDevil
Copy link
Contributor

  • Check for WinError.wsa_value instead of Errno.value, since Windows does not set the latter.
  • Actually raise the exception instead of returning it, the same as src/crystal/system/unix/socket.cr.

@HertzDevil HertzDevil added kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:windows Windows support based on the MSVC toolchain topic:stdlib:networking labels Apr 21, 2024
Copy link
Member

@straight-shoota straight-shoota left a comment

Choose a reason for hiding this comment

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

Would be nice to test this. But I suppose it's hard to set up a condition for this...?

@straight-shoota straight-shoota added this to the 1.13.0 milestone Apr 22, 2024
@straight-shoota straight-shoota merged commit c428bab into crystal-lang:master Apr 23, 2024
60 checks passed
@HertzDevil HertzDevil deleted the bug/windows-socket-close-err branch April 23, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:windows Windows support based on the MSVC toolchain topic:stdlib:networking
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants