Skip to content

Commit

Permalink
Handle case when process already ended
Browse files Browse the repository at this point in the history
As there is no way to differentiate between "already ended" and "never
existed" PIDs it will return `:ok` even when provided never-existing
PID.
  • Loading branch information
hauleth committed Oct 11, 2018
1 parent 740adab commit d177467
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/imager/runner.ex
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ defmodule Imager.Runner do

receive do
{:DOWN, ^ref, :process, ^pid, :normal} -> :ok
{:DOWN, ^ref, :process, ^pid, :noproc} -> :ok
{:DOWN, ^ref, :process, ^pid, _} -> :error
end
end
Expand Down

0 comments on commit d177467

Please sign in to comment.