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: UNIXServer shouldn't delete path on bind failures #3771

Conversation

ysbaddaden
Copy link
Contributor

fixes #3764

raise error
end

listen(backlog) do |error|
close
close(delete: false)
Copy link
Member

Choose a reason for hiding this comment

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

Is there a possibility that the bind call above succeeds and creates the file, but listen fails? I think in this case the file should be deleted, right?

@ysbaddaden ysbaddaden force-pushed the fix-unix-server-deletes-file-on-bind-failures branch from 04b1820 to f0009cd Compare December 26, 2016 08:31
@ysbaddaden
Copy link
Contributor Author

@asterite fixed

@bew
Copy link
Contributor

bew commented Dec 26, 2016

I forgot to start a review with my pending comment, but @asterite found the issue with listen, too, so I'm ok with this PR

@asterite asterite merged commit 3512d3c into crystal-lang:master Dec 26, 2016
@ysbaddaden ysbaddaden deleted the fix-unix-server-deletes-file-on-bind-failures branch December 26, 2016 17:21
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.

[critical] UNIXServer delete important file if it cannot bind to it
3 participants