Skip to content

Commit

Permalink
make thin available if it's used
Browse files Browse the repository at this point in the history
  • Loading branch information
namusyaka committed Aug 29, 2020
1 parent bb41347 commit 4b502e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/sinatra/base.rb
Expand Up @@ -1475,7 +1475,8 @@ def use(middleware, *args, &block)
# Stop the self-hosted server if running.
def quit!
return unless running?
running_server.stop
# Use Thin's hard #stop! if available, otherwise just #stop.
running_server.respond_to?(:stop!) ? running_server.stop! : running_server.stop
$stderr.puts "== Sinatra has ended his set (crowd applauds)" unless suppress_messages?
set :running_server, nil
set :handler_name, nil
Expand Down

0 comments on commit 4b502e0

Please sign in to comment.