Fix eunit regression introduced in 2716d83a18

Use alternative way to detect net_kernel:stop/0 has succeeded as
suggested by Ulf Wiger.
This commit is contained in:
Tuncer Ayaz 2013-08-14 09:24:39 +02:00
parent e840ac2112
commit 0550560221

View file

@ -802,11 +802,11 @@ pause_until_net_kernel_stopped() ->
pause_until_net_kernel_stopped(0) -> pause_until_net_kernel_stopped(0) ->
exit(net_kernel_stop_failed); exit(net_kernel_stop_failed);
pause_until_net_kernel_stopped(N) -> pause_until_net_kernel_stopped(N) ->
try case node() of
'nonode@nohost' ->
?DEBUG("Stopped net kernel.\n", []),
ok;
_ ->
timer:sleep(100), timer:sleep(100),
pause_until_net_kernel_stopped(N - 1) pause_until_net_kernel_stopped(N - 1)
catch
error:badarg ->
?DEBUG("Stopped net kernel.\n", []),
ok
end. end.