diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-03-02 18:33:05 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-03-03 11:13:21 -0800 |
commit | 2b3996283df2caa5777dd56b8bc36b29bf749a75 (patch) | |
tree | b8dd15ccc51eccb1ec51edee2d2ff771b507b124 | |
parent | fa0c8d7950f5f3f482e0691542e05c02b0db4a84 (diff) | |
download | unicorn-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.rb | 2 |
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 |