diff options
| author | John DeTreville <jdetreville@vmware.com> | 2011-02-07 14:45:08 -0800 |
|---|---|---|
| committer | John DeTreville <jdetreville@vmware.com> | 2011-02-07 14:45:08 -0800 |
| commit | c7947095354436520ff5c5632dddf53c96bda81a (patch) | |
| tree | b34691afca8a6acf90982206dbd20f6a4d9665cf | |
| parent | aba5c6643970c12b220f82fdda1b82bae338458b (diff) | |
| download | rabbitmq-server-git-c7947095354436520ff5c5632dddf53c96bda81a.tar.gz | |
Updated file_handle_cache.erl
| -rw-r--r-- | src/file_handle_cache.erl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl index 1e1f37cb3d..b5b07ecab1 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. |
