diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-20 16:09:09 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-20 16:09:09 +0100 |
commit | f0c9be010738e572cba6bfbf8a8639bdb43f8485 (patch) | |
tree | d1deb6f8a82bcb4b407ebd12ce79fd778795bf1c | |
parent | 7acbd298d962d8d13697aa767b0614ebbd259c42 (diff) | |
download | rabbitmq-server-f0c9be010738e572cba6bfbf8a8639bdb43f8485.tar.gz |
simplification due to the fact that we always request closing of all
-rw-r--r-- | src/file_handle_cache.erl | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl index b90f8bee..60991e1d 100644 --- a/src/file_handle_cache.erl +++ b/src/file_handle_cache.erl @@ -994,14 +994,12 @@ notify(_Clients, _Required, []) -> ok; notify(_Clients, Required, _Notifications) when Required =< 0 -> ok; -notify(Clients, Required, [#cstate{ callback = {M, F, A}, opened = Opened, - pid = Pid, pending_closes = PendingCloses } - | Notifications]) -> - Closable = Opened - PendingCloses, +notify(Clients, Required, [#cstate{ pid = Pid, + callback = {M, F, A}, + opened = Opened } | Notifications]) -> apply(M, F, A ++ [0]), - ets:update_element(Clients, Pid, - {#cstate.pending_closes, PendingCloses + Closable}), - notify(Clients, Required - Closable, Notifications). + ets:update_element(Clients, Pid, {#cstate.pending_closes, Opened}), + notify(Clients, Required - Opened, Notifications). ensure_mref(Pid, Clients) -> case ets:insert_new(Clients, #cstate { pid = Pid, |