fix(emqx_cover): wait for DOWN message before new spawn
This commit is contained in:
parent
22c27cb45f
commit
13b14aafa5
|
@ -100,7 +100,13 @@ abort() ->
|
|||
_ = cover:stop(),
|
||||
case whereis(?SRC) of
|
||||
undefined -> ok;
|
||||
Pid -> exit(Pid, kill)
|
||||
Pid ->
|
||||
Ref = monitor(process, Pid),
|
||||
exit(Pid, kill),
|
||||
receive
|
||||
{'DOWN', Ref, process, Pid, _} ->
|
||||
ok
|
||||
end
|
||||
end,
|
||||
ok.
|
||||
|
||||
|
|
Loading…
Reference in New Issue