Skip to content

Commit 3a06d38

Browse files
committed
Stop accept loops when exiting server run task.
1 parent bdab654 commit 3a06d38

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/async/http/server.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ def run
6767

6868
# Wait for all children to finish:
6969
task.children.each(&:wait)
70+
ensure
71+
# Stop all children (accept loops) on exit:
72+
task.children.each(&:stop)
7073
end
7174
end
7275
end

0 commit comments

Comments
 (0)