Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add start and stop callbacks #1913

Merged
merged 10 commits into from
Jul 11, 2023
Prev Previous commit
Next Next commit
Update lib/sinatra/base.rb
Co-authored-by: Patrik Ragnarsson <patrik@starkast.net>
  • Loading branch information
jevin and dentarg committed Jun 22, 2023
commit 31bf8d796e106d6a91439639fd38f9882a9d3de8
2 changes: 1 addition & 1 deletion lib/sinatra/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ def quit!
set :running_server, nil
set :handler_name, nil

on_stop_callback.call if !on_stop_callback.nil?
on_stop_callback.call unless on_stop_callback.nil?
end

alias stop! quit!
Expand Down