Skip to content

Commit

Permalink
Update server_spawn.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
MSP-Greg committed Apr 19, 2024
1 parent c991f60 commit 3fae82a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/helpers/test_puma/server_spawn.rb
Expand Up @@ -120,15 +120,16 @@ def stop_server(pid = @pid, signal: :SIGINT, timeout: 10, log: nil)
@server_stopped = true
ary = kill_and_wait pid, signal: signal

if pid == @pid && @spawn_pid != @pid && ary.nil?
ary = wait2_timeout @spawn_pid, timeout: timeout
end

if pid == @pid
if ary.nil? && @spawn_pid != pid
ary = wait2_timeout @spawn_pid, timeout: timeout
end

@server = nil
@spawn_pid = nil if @spawn_pid == @pid
@pid = nil
end

ary
end

Expand Down

0 comments on commit 3fae82a

Please sign in to comment.