Skip to content

Commit

Permalink
Fix eunit regression introduced in 2716d83
Browse files Browse the repository at this point in the history
Use alternative way to detect net_kernel:stop/0 has succeeded as
suggested by Ulf Wiger.
  • Loading branch information
Tuncer Ayaz committed Sep 20, 2013
1 parent e840ac2 commit 0550560
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/rebar_eunit.erl
Original file line number Diff line number Diff line change
Expand Up @@ -802,11 +802,11 @@ pause_until_net_kernel_stopped() ->
pause_until_net_kernel_stopped(0) ->
exit(net_kernel_stop_failed);
pause_until_net_kernel_stopped(N) ->
try
timer:sleep(100),
pause_until_net_kernel_stopped(N - 1)
catch
error:badarg ->
case node() of
'nonode@nohost' ->
?DEBUG("Stopped net kernel.\n", []),
ok
ok;
_ ->
timer:sleep(100),
pause_until_net_kernel_stopped(N - 1)
end.

0 comments on commit 0550560

Please sign in to comment.