Skip to content

Commit

Permalink
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spec/ruby/library/net/http/http/fixtures/http_server.rb
Original file line number Diff line number Diff line change
@@ -73,7 +73,13 @@ def start_server
end

def stop_server
@server.shutdown if @server
if @server
begin
@server.shutdown
rescue Errno::EPIPE
# Because WEBrick is not thread-safe and only catches IOError
end
end
if @server_thread
ruby_version_is "2.2" do # earlier versions can stay blocked on IO.select
@server_thread.join

0 comments on commit 40a90b1

Please sign in to comment.