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

Commit ccb68b1

Browse files
Merge pull request #92 from rabbitmq/rabbitmq-common-224
Since apps have deps, we should be using ensure_all_started
2 parents 03bf3d2 + 6245170 commit ccb68b1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/amqp_client.erl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@ start() ->
3131
%%
3232
%% * https://github.com/rabbitmq/rabbitmq-erlang-client/issues/72
3333
%% * https://github.com/rabbitmq/rabbitmq-common/pull/149
34-
application:start(syntax_tools),
35-
application:start(compiler),
36-
application:start(xmerl),
37-
application:start(rabbit_common),
38-
application:start(amqp_client).
34+
application:ensure_all_started(rabbit_common),
35+
{ok, _} = application:ensure_all_started(amqp_client),
36+
ok.
3937

4038
%%---------------------------------------------------------------------------
4139
%% application callbacks

src/amqp_connection.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,9 @@ ensure_started() ->
201201
ensure_started(App) ->
202202
case is_pid(application_controller:get_master(App)) andalso amqp_sup:is_ready() of
203203
true -> ok;
204-
false -> case application:start(App) of
204+
false -> case application:ensure_all_started(App) of
205205
ok -> ok;
206+
{ok, _} -> ok;
206207
{error, {already_started, App}} -> ok;
207208
{error, _} = E -> throw(E)
208209
end

0 commit comments

Comments
 (0)