Skip to content

Commit 9913a77

Browse files
committed
Do not assume uniqueness on the checker
1 parent 77ab395 commit 9913a77

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/elixir/lib/module/parallel_checker.ex

+4-2
Original file line numberDiff line numberDiff line change
@@ -615,8 +615,10 @@ defmodule Module.ParallelChecker do
615615
end
616616

617617
def handle_info({__MODULE__, :done, module}, state) do
618-
{timer, spawned} = Map.pop!(state.spawned, module)
619-
Process.cancel_timer(timer)
618+
# Unfortunately we cannot assume uniqueness because the same module
619+
# may be defined by mistake several times
620+
{timer, spawned} = Map.pop(state.spawned, module)
621+
timer && Process.cancel_timer(timer)
620622
{:noreply, run_checkers(%{state | spawned: spawned})}
621623
end
622624

0 commit comments

Comments
 (0)