Skip to content

Commit e3285bd

Browse files
nobuhsbt
authored andcommitted
Wait for server threads to finish
1 parent d22211d commit e3285bd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/net/http/utils.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ def run(socket)
4141
end
4242

4343
def shutdown
44-
@thread.kill if @thread
45-
@server.close if @server
44+
@thread&.kill
45+
@server&.close
46+
@thread&.join
4647
end
4748

4849
def mount(path, proc)

0 commit comments

Comments
 (0)