summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2013-08-14 09:24:39 +0200
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2013-09-20 20:53:16 +0200
commit0550560221fde6d5c19bec472e395fb20d720252 (patch)
treeaaed29af5ec27e9afde4581765aa6e22728839f4 /src
parente840ac211280b26ec0795960c15744fe8b17affb (diff)
Fix eunit regression introduced in 2716d83a18
Use alternative way to detect net_kernel:stop/0 has succeeded as suggested by Ulf Wiger.
Diffstat (limited to 'src')
-rw-r--r--src/rebar_eunit.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl
index 95ba3e8..d39b1a2 100644
--- a/src/rebar_eunit.erl
+++ b/src/rebar_eunit.erl
@@ -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.