Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This addresses the test issue from #44. It appears the issue is that the server aborts for an unknown reason. There is no other way the pipe could be closed when the attempt to write to it occurs.
Looking at the test directly above the new one https://github.com/ruby/webrick/blob/1daacc18490cbc96bcf1bdc741f3ccff65a0d164/test/webrick/test_server.rb#L151-L161- it appears that it assumes that a server may not start properly and simply appears to skip the test if the server fails to start. The only way on line 156 that the thread status is a falsy value is if the thread is already dead when it is examined. That would imply the server is non-existent at that point.
The fix tries 10 times to bring up a server and if it fails to do so - it continues on.