summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-12-13 15:04:59 -0800
committerEric Wong <normalperson@yhbt.net>2011-12-13 15:04:59 -0800
commit68e8d3726542c549f291f82bdcb751d372c34597 (patch)
treec8fb8727847a397b238bd8f03364848d96efbd66
parent7688fe59a8a80f473b276aa1ab01ff24cab6a653 (diff)
No need to duplicate logic here
-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