Skip to content

Commit

Permalink
Fix shard initialization/termination
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Miller committed Apr 23, 2012
1 parent a944735 commit 8f28ecb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/boss_db_controller.erl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ init(Options) ->
undefined -> Adapter;
ShortName -> list_to_atom(lists:concat(["boss_db_adapter_", ShortName]))
end,
{ok, ShardConn} = ShardAdapter:start(ShardOptions ++ Options),
{ok, ShardConn} = ShardAdapter:init(ShardOptions ++ Options),
Index = erlang:length(ShardAcc),
NewDict = lists:foldr(fun(ModelAtom, Dict) ->
dict:store(ModelAtom, Index, Dict)
Expand Down Expand Up @@ -151,7 +151,7 @@ terminate(_Reason, State) ->
Conn = State#state.connection,
Adapter:terminate(Conn),
lists:map(fun({A, C}) ->
A:stop(C)
A:terminate(C)
end, State#state.shards).

code_change(_OldVsn, State, _Extra) ->
Expand Down

0 comments on commit 8f28ecb

Please sign in to comment.