summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn DeTreville <jdetreville@vmware.com>2011-02-07 14:45:08 -0800
committerJohn DeTreville <jdetreville@vmware.com>2011-02-07 14:45:08 -0800
commit1fcc077284fd29b909ac1bf57b3b1916cbe4927e (patch)
treeb34691afca8a6acf90982206dbd20f6a4d9665cf
parentfe023f67621c778aa1a306a5521492c1abaeb254 (diff)
downloadrabbitmq-server-1fcc077284fd29b909ac1bf57b3b1916cbe4927e.tar.gz
Updated file_handle_cache.erl
-rw-r--r--src/file_handle_cache.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl
index 1e1f37cb..b5b07eca 100644
--- a/src/file_handle_cache.erl
+++ b/src/file_handle_cache.erl
@@ -908,10 +908,10 @@ handle_cast({transfer, FromPid, ToPid}, State) ->
ok = track_client(ToPid, State#fhc_state.clients),
{noreply, process_pending(
update_counts(obtain, ToPid, +1,
- update_counts(obtain, FromPid, -1, State)))};
+ update_counts(obtain, FromPid, -1, State)))}.
-handle_cast(check_counts, State) ->
- {noreply, maybe_reduce(State #fhc_state { timer_ref = undefined })}.
+handle_info(check_counts, State) ->
+ {noreply, maybe_reduce(State #fhc_state { timer_ref = undefined })};
handle_info({'DOWN', _MRef, process, Pid, _Reason},
State = #fhc_state { elders = Elders,
@@ -1104,9 +1104,9 @@ reduce(State = #fhc_state { open_pending = OpenPending,
end
end,
case TRef of
- undefined -> {ok, TRef1} = timer:apply_after(
- ?FILE_HANDLES_CHECK_INTERVAL,
- gen_server, cast, [?SERVER, check_counts]),
+ undefined -> TRef1 = erlang:send_after(
+ ?FILE_HANDLES_CHECK_INTERVAL, ?SERVER,
+ check_counts),
State #fhc_state { timer_ref = TRef1 };
_ -> State
end.