1
0
Fork 0
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:
slavic 2012-03-26 00:13:11 +03:00
parent a2da39ca5d
commit a022c41972

View file

@ -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