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::Connect error in addrinfo inherit os_error #10782

Merged

Conversation

straight-shoota
Copy link
Member

This change is necessary, because errno may not actually have the corresponding value anymore, and the reliance on Errno is not portable.

The first commit changes SystemError.new_from_os_error to allow message parameter be nil. os_error in .from_os_error may be nil, hence the message can be nil, too.

@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:networking topic:stdlib:system labels Jun 4, 2021
@straight-shoota straight-shoota requested a review from waj June 4, 2021 11:28
Copy link
Member

@beta-ziliani beta-ziliani left a comment

Choose a reason for hiding this comment

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

LGTM 👌

@straight-shoota straight-shoota added this to the 1.1.0 milestone Jun 10, 2021
@straight-shoota straight-shoota merged commit 32a36dd into crystal-lang:master Jun 13, 2021
@straight-shoota straight-shoota deleted the fix/addrinfo-connect-error branch June 13, 2021 20:19
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. kind:refactor topic:stdlib:networking topic:stdlib:system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants