Skip to content

Commit eded15b

Browse files
committed
Fix wrong condition when replacing a fork
As reported in #305. I haven't managed to reproduce this, but the right logic is definitely the one in this commit. Thanks to @Darhazer for catching this.
1 parent d5bad5a commit eded15b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/solid_queue/supervisor/fork_supervisor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def reap_terminated_forks
8484
pid, status = ::Process.waitpid2(-1, ::Process::WNOHANG)
8585
break unless pid
8686

87-
if (terminated_fork = forks.delete(pid)) && !status.exited? || status.exitstatus > 0
87+
if (terminated_fork = forks.delete(pid)) && (!status.exited? || status.exitstatus > 0)
8888
handle_claimed_jobs_by(terminated_fork, status)
8989
end
9090

0 commit comments

Comments
 (0)