1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Attempting to debug why background jobs aren't always waited for

This commit is contained in:
Daniel Shelton 2014-08-06 11:50:04 +01:00
parent df3f34e81c
commit af3d62c46a
2 changed files with 4 additions and 2 deletions

View file

@ -195,7 +195,9 @@ module Puma
server = start_server
Signal.trap "SIGTERM" do
STDERR.puts "Got SIGTERM in worker"
server.stop
STDERR.puts "Finished processing SIGTERM in worker"
end
begin

View file

@ -756,7 +756,7 @@ module Puma
# The server, in another thread, is shutting down
end
@thread.join if @thread && sync
(@thread.join and @thread = nil) if @thread && sync
end
def halt(sync=false)
@ -766,7 +766,7 @@ module Puma
# The server, in another thread, is shutting down
end
@thread.join if @thread && sync
(@thread.join and @thread = nil) if @thread && sync
end
def begin_restart