Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Commit

Permalink
Merge bug26160 (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon MacMullen committed May 6, 2014
2 parents 7b1f3b4 + f17f232 commit 36cd513
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/amqp_connection.erl
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,16 @@ start(AmqpParams) ->
%% application controller is in the process of shutting down the very
%% application which is making this call.
ensure_started() ->
case application_controller:get_master(amqp_client) of
undefined ->
case amqp_client:start() of
ok -> ok;
{error, {already_started, amqp_client}} -> ok;
{error, _} = E -> throw(E)
end;
_ ->
ok
[ensure_started(App) || App <- [xmerl, amqp_client]].

ensure_started(App) ->
case application_controller:get_master(App) of
undefined -> case application:start(App) of
ok -> ok;
{error, {already_started, App}} -> ok;
{error, _} = E -> throw(E)
end;
_ -> ok
end.

%%---------------------------------------------------------------------------
Expand Down

0 comments on commit 36cd513

Please sign in to comment.