diff --git a/lib/puma/launcher.rb b/lib/puma/launcher.rb index cbf477a934..865bc08cbb 100644 --- a/lib/puma/launcher.rb +++ b/lib/puma/launcher.rb @@ -414,16 +414,14 @@ def setup_signals log "*** SIGINT not implemented, signal based gracefully stopping unavailable!" end - begin - Signal.trap "SIGHUP" do - if @runner.redirected_io? + if @runner.redirected_io? + begin + Signal.trap "SIGHUP" do @runner.redirect_io - else - stop end + rescue Exception + log "*** SIGHUP not implemented, signal based logs reopening unavailable!" end - rescue Exception - log "*** SIGHUP not implemented, signal based logs reopening unavailable!" end end end