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 97cd32f3d0048cbe2bf9407ebc957e5722010d05
2 changes: 1 addition & 1 deletion lib/sinatra/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1656,7 +1656,7 @@ def start_server(handler, server_settings, handler_name)
set :running_server, server
set :handler_name, handler_name
server.threaded = settings.threaded if server.respond_to? :threaded=
on_start_callback.call if !on_start_callback.nil?
on_start_callback.call unless on_start_callback.nil?
yield server if block_given?
end
end
Expand Down