From 30f57637ee2399d754cf78f09e8aa275923dff0d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 29 Jul 2024 17:27:47 +0900 Subject: [PATCH] Wait for server threads to finish --- test/net/http/utils.rb | 5 +++-- 1 file 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)