Skip to content

Commit

Permalink
don't crash when Node:status/1 is called prior to any gen_server init…
Browse files Browse the repository at this point in the history
…ialising
  • Loading branch information
Tim Watson committed May 31, 2012
1 parent a2d513b commit f7b0262
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/systest_cli.erl
Expand Up @@ -71,9 +71,9 @@ kill(#'systest.node_info'{owner=Server}) ->

-spec status(systest_node:node_info()) -> 'nodeup' | {'nodedown', term()}.
status(#'systest.node_info'{owner=Server}) ->
case is_process_alive(Server) of
false -> ct:pal("Server process down!~n"), {'nodedown', unknown};
true -> gen_server:call(Server, ping)
case catch(is_process_alive(Server)) of
true -> gen_server:call(Server, ping);
_ -> {'nodedown', no_server}
end.

-spec interact(systest_node:node_info(),
Expand Down

0 comments on commit f7b0262

Please sign in to comment.