Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Make riak_btree_backend:stop actually stop the gen_server

  • Loading branch information...
commit c5541f07d3c35acf68f1f04bf44537833d700485 1 parent 6cd4e9b
Kresten Krab Thorup authored

Showing 1 changed file with 1 addition and 3 deletions. Show diff stats Hide diff stats

  1. +1 3 src/riak_btree_backend.erl
4 src/riak_btree_backend.erl
@@ -176,7 +176,7 @@ handle_cast(_, State) -> {noreply, State}.
176 176 handle_call(get_btree,_From,State) ->
177 177 {reply, State#state.btree, State};
178 178 handle_call(stop,_From,State) ->
179   - {reply, srv_stop(State), State};
  179 + {stop, normal, ok, State};
180 180 handle_call({put,BKey,Val},_From,State) ->
181 181 srv_put(State,BKey,Val);
182 182 handle_call({delete,BKey},_From,State) ->
@@ -238,8 +238,6 @@ srv_finish_compact(#state{compactor=CompactorPID, btree=#btree{fd=FdIn}, path=Pa
238 238 % @spec stop(state()) -> ok | {error, Reason :: term()}
239 239 stop(SrvRef) ->
240 240 gen_server2:call(SrvRef, stop, infinity).
241   -srv_stop(#state{btree=#btree{fd=Fd}}) ->
242   - couch_file:close(Fd).
243 241
244 242 % get(state(), riak_object:bkey()) ->
245 243 % {ok, Val :: binary()} | {error, Reason :: term()}

0 comments on commit c5541f0

Please sign in to comment.
Something went wrong with that request. Please try again.