Fix up the ensure_started code
This commit is contained in:
parent
752f9f5b62
commit
0fa8ab4a02
1 changed files with 6 additions and 3 deletions
|
@ -448,9 +448,12 @@ do_transact(TransactionSpec, State=#state{ nursery=Nursery, top=Top }) ->
|
||||||
{ok, State#state{ nursery=Nursery2 }}.
|
{ok, State#state{ nursery=Nursery2 }}.
|
||||||
|
|
||||||
start_app() ->
|
start_app() ->
|
||||||
application:start(syntax_tools),
|
ok = ensure_started(syntax_tools),
|
||||||
application:start(plain_fsm),
|
ok = ensure_started(plain_fsm),
|
||||||
case application:start(?MODULE) of
|
ok = ensure_started(?MODULE).
|
||||||
|
|
||||||
|
ensure_started(Application) ->
|
||||||
|
case application:start(Application) of
|
||||||
ok ->
|
ok ->
|
||||||
ok;
|
ok;
|
||||||
{error, {already_started, _}} ->
|
{error, {already_started, _}} ->
|
||||||
|
|
Loading…
Reference in a new issue