diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-06-30 17:33:15 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-06-30 17:33:15 -0700 |
commit | 8c2040127770e40e344a927ddc187bf801073e33 (patch) | |
tree | 40d63ab095bdf0c78773ea599899ed562c430689 /lib/unicorn.rb | |
parent | 20bf660a3efff9229c81b3b3a0feb6844bc27a7c (diff) | |
download | unicorn-8c2040127770e40e344a927ddc187bf801073e33.tar.gz |
This allows another process to take our listeners sooner rather than later.
Diffstat (limited to 'lib/unicorn.rb')
-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 6e937bf..3c8c4c4 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -261,6 +261,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 @@ -271,8 +272,6 @@ module Unicorn (timeleft -= step) > 0 and next kill_each_worker(:KILL) end - ensure - self.listeners = [] end private |