mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Add interruption support to Rack Handler
This commit is contained in:
parent
a2da39ca5d
commit
a022c41972
1 changed files with 8 additions and 1 deletions
|
@ -30,7 +30,14 @@ module Rack
|
|||
server.max_threads = Integer(max)
|
||||
yield server if block_given?
|
||||
|
||||
server.run.join
|
||||
begin
|
||||
server.run.join
|
||||
rescue Interrupt
|
||||
puts "* Gracefully stopping, waiting for requests to finish"
|
||||
server.stop(true)
|
||||
puts "* Goodbye!"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def self.valid_options
|
||||
|
|
Loading…
Add table
Reference in a new issue