diff --git a/lib/puma/single.rb b/lib/puma/single.rb index ca07ff63..3a65b2e9 100644 --- a/lib/puma/single.rb +++ b/lib/puma/single.rb @@ -24,7 +24,7 @@ module Puma end def stop - @server.stop false + @server.stop(false) if @server end def halt @@ -34,7 +34,7 @@ module Puma def stop_blocked log "- Gracefully stopping, waiting for requests to finish" @control.stop(true) if @control - @server.stop(true) + @server.stop(true) if @server end def jruby_daemon?