Skip to content

Commit 6963035

Browse files
committed
make workers temporary
1 parent 79b9351 commit 6963035

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/pool_toy/pool_man.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ defmodule PoolToy.PoolMan do
9090
end
9191

9292
defp new_worker(sup, spec) do
93-
{:ok, pid} = PoolToy.WorkerSup.start_worker(sup, spec)
93+
child_spec = Supervisor.child_spec(spec, restart: :temporary)
94+
{:ok, pid} = PoolToy.WorkerSup.start_worker(sup, child_spec)
9495
true = Process.link(pid)
9596
pid
9697
end

0 commit comments

Comments
 (0)