about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-03-02 18:33:05 -0800
committerEric Wong <normalperson@yhbt.net>2009-03-03 11:13:21 -0800
commit2b3996283df2caa5777dd56b8bc36b29bf749a75 (patch)
treeb8dd15ccc51eccb1ec51edee2d2ff771b507b124
parentfa0c8d7950f5f3f482e0691542e05c02b0db4a84 (diff)
downloadunicorn-2b3996283df2caa5777dd56b8bc36b29bf749a75.tar.gz
If we get woken up during an IO.select, just make a bet that we
spent some time doing something else and aggressively try to
accept new connections without trying to wait for I/O-readiness
notification.
-rw-r--r--lib/unicorn.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index 31af720..42ac8c0 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -473,6 +473,8 @@ module Unicorn
               # timeout used so we can detect parent death:
               ret = IO.select(@listeners, nil, nil, @timeout/2.0) or next
               ready = ret[0]
+            rescue Errno::EINTR
+              ready = @listeners
             rescue Errno::EBADF => e
               exit(alive ? 1 : 0)
             end