summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-07-29 17:27:47 +0900
committerHiroshi SHIBATA <[email protected]>2024-07-30 07:33:43 +0800
commit30f57637ee2399d754cf78f09e8aa275923dff0d (patch)
treebc622213bd2b7dd02dc000b41ddd4e69ae825485
parent0afbc73b2a0412656413fb984804b800b2d08d8a (diff)
Wait for server threads to finish
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11273
-rw-r--r--test/net/http/utils.rb5
1 files changed, 3 insertions, 2 deletions
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)