-
-
Notifications
You must be signed in to change notification settings - Fork 706
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
fixes #23507 sockets are blocking by default, this needs to reflect that #8630
Conversation
|
Thanks for your pull request and interest in making D better, @adamdruppe! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#8630" |
|
I feel that this should have a changelog entry so there is documentation of this. |
|
i just filed a bugzilla https://issues.dlang.org/show_bug.cgi?id=23507 |
|
Need to update the commit title, otherwise this looks good to go. I don't think a test is really necessary, but I won't say no to one. |
|
I don't think a test can be meaningful here unless it actually maybe asked the operating system to confirm the state which didn't used to be possible. I think it is now but it is a bit of a hassle. |
|
What if you create a Socket by passing in an existing It might be blocking, non-blocking, who knows? Well, on linux we can check, but on windows there doesn't seem to be an api for it (says 5min googling). Still, this MR should go in, because they do start out blocking. |
|
Yeah, we should probably at least document that... or make it a required argument to that ctor but that's a hassle. i kinda like std.socket but i also kinda hate it too lol it is useful but has a few rough edges |
This is remarkable to me - git blame says this was there in the initial commit to git in 2007, meaning it goes back to prehistory (though I could probably download some ancient phobos and check there, but i suspect it has been there the whole time), but I'm almost certain this is wrong.
Windows sockets are blocking by default. The Phobos docs, the constructor for Socket, states that it "creates a blocking socket". The behavior is blocking. But this property defaults to false.... and a new commit to my code happened to use it, assuming it had correct info, causing a regression for me!
But, as far as I can tell, this should have been true by default the whole time.