diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-06-30 17:33:15 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-07-08 14:48:57 -0700 |
commit | 2fbbd59ea9b47e7bbf44ba848ac017905720c2fd (patch) | |
tree | ff23655eff2d54167b571b33eb9b731e04f74503 /lib | |
parent | ad41ed987915b505d12adbf41342785a1ee35356 (diff) | |
download | unicorn-2fbbd59ea9b47e7bbf44ba848ac017905720c2fd.tar.gz |
This allows another process to take our listeners sooner rather than later. (cherry picked from commit 8c2040127770e40e344a927ddc187bf801073e33)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicorn.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb index f43bb0f..7173a29 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -253,6 +253,7 @@ module Unicorn # Terminates all workers, but does not exit master process def stop(graceful = true) + self.listeners = [] kill_each_worker(graceful ? :QUIT : :TERM) timeleft = @timeout step = 0.2 @@ -263,8 +264,6 @@ module Unicorn (timeleft -= step) > 0 and next kill_each_worker(:KILL) end - ensure - self.listeners = [] end private |