From 68e8d3726542c549f291f82bdcb751d372c34597 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 13 Dec 2011 15:04:59 -0800 Subject: cleanup exception handling on SIGUSR1 No need to duplicate logic here --- lib/unicorn/http_server.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index 6e90564..7d2c623 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -622,10 +622,8 @@ class Unicorn::HttpServer # timeout used so we can detect parent death: worker.tick = Time.now.to_i ret = IO.select(l, nil, SELF_PIPE, @timeout) and ready = ret[0] - rescue Errno::EBADF - nr < 0 or return rescue => e - redo if nr < 0 && IOError === e + redo if nr < 0 && (Errno::EBADF === e || IOError === e) # reopen logs Unicorn.log_error(@logger, "listen loop error", e) if worker end while worker end -- cgit v1.2.3-24-ge0c7