Class: Rack::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/yodel/middleware/rack_server.rb

Instance Method Summary collapse

Instance Method Details

#original_startObject



4
# File 'lib/yodel/middleware/rack_server.rb', line 4

alias :original_start :start

#startObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/yodel/middleware/rack_server.rb', line 5

def start
  trap(:TERM) do
    if server.respond_to?(:shutdown)
      server.shutdown
    else
      exit
    end
  end
  original_start
end