From 86ea6ed1417bfe731cadeced0f6c386cfc0e0894 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 28 Dec 2018 20:00:16 +0000 Subject: server: respect shutdown_timeout It seems there is still a bug in the proxy code which causes this timeout expiries to be missed. --- lib/yahns/server.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/yahns/server.rb b/lib/yahns/server.rb index 583fd38..128b894 100644 --- a/lib/yahns/server.rb +++ b/lib/yahns/server.rb @@ -500,6 +500,8 @@ class Yahns::Server # :nodoc: if drop_acceptors[0] || fdmap.size > 0 timeout = @shutdown_expire < Yahns.now ? -1 : @shutdown_timeout n = fdmap.desperate_expire(timeout) + return false if timeout == -1 + $0 = "yahns quitting, #{n} FD(s) remain" true else -- cgit v1.2.3-24-ge0c7