diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-06-25 22:40:20 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-06-25 22:40:20 +0000 |
commit | 441bb8ab48f15f583b82a3f8520648a4694a198f (patch) | |
tree | 0ebc099f707f827af7b4f9a3e30862649a52e0fe /lib/unicorn/http_server.rb | |
parent | 63bcecf48994aa9afe6dc2890efe3ba4b0696bbf (diff) | |
download | unicorn-441bb8ab48f15f583b82a3f8520648a4694a198f.tar.gz |
Some applications/libraries may launch background threads which can lock up the process. So we can't disable heartbeat checking just because the main thread is sleeping. This also has the side effect of reducing master process wakeups when all workers are idle.
Diffstat (limited to 'lib/unicorn/http_server.rb')
-rw-r--r-- | lib/unicorn/http_server.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index 80983bb..f033764 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -600,7 +600,7 @@ class Unicorn::HttpServer ppid == Process.ppid or return # timeout used so we can detect parent death: - worker.tick = 0 + 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 |