about summary refs log tree commit homepage
path: root/lib/unicorn/http_server.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicorn/http_server.rb')
-rw-r--r--lib/unicorn/http_server.rb4
1 files changed, 1 insertions, 3 deletions
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