Skip to content

Fix Socket::Connect error in addrinfo inherit os_error #10782

Merged
straight-shoota merged 2 commits intocrystal-lang:masterfrom
straight-shoota:fix/addrinfo-connect-error
Jun 13, 2021
Merged

Fix Socket::Connect error in addrinfo inherit os_error #10782
straight-shoota merged 2 commits intocrystal-lang:masterfrom
straight-shoota:fix/addrinfo-connect-error

Conversation

@straight-shoota
Copy link
Copy Markdown
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
Copy Markdown
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