diff --git a/test/net/http/utils.rb b/test/net/http/utils.rb index 6da7175f13..cb621da998 100644 --- a/test/net/http/utils.rb +++ b/test/net/http/utils.rb @@ -41,8 +41,9 @@ module TestNetHTTPUtils end def shutdown - @thread.kill if @thread - @server.close if @server + @thread&.kill + @server&.close + @thread&.join end def mount(path, proc)