Switch to start_link

Start all processes linked - to collapse the whole tree if one process fails
This commit is contained in:
Martin Sumner 2018-06-28 12:16:43 +01:00
parent 92bd2513c1
commit 082eabb65b
7 changed files with 20 additions and 18 deletions

View file

@ -59,9 +59,9 @@
clerk_new(Owner, Manifest, CompressionMethod) ->
{ok, Pid} =
gen_server:start(?MODULE,
[{compression_method, CompressionMethod}],
[]),
gen_server:start_link(?MODULE,
[{compression_method, CompressionMethod}],
[]),
ok = gen_server:call(Pid, {load, Owner, Manifest}, infinity),
leveled_log:log("PC001", [Pid, Owner]),
{ok, Pid}.