diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2010-10-22 04:11:13 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-10-22 04:11:13 +0100 |
commit | 03a4399d036fda9dd5def39812e23de5d6b5b951 (patch) | |
tree | 78502516596da8e935fd0f685d50647f64b867d7 | |
parent | ac7d5c92bc9ed61631f08bc97479f3193b539277 (diff) | |
download | rabbitmq-server-03a4399d036fda9dd5def39812e23de5d6b5b951.tar.gz |
small refactor
-rw-r--r-- | src/rabbit_msg_store_gc.erl | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/rabbit_msg_store_gc.erl b/src/rabbit_msg_store_gc.erl index cd303f7c..833222f0 100644 --- a/src/rabbit_msg_store_gc.erl +++ b/src/rabbit_msg_store_gc.erl @@ -108,16 +108,15 @@ handle_cast({delete, File}, State) -> handle_cast({no_readers, File}, State = #state { pending_no_readers = Pending }) -> - State1 = case dict:find(File, Pending) of - error -> - State; - {ok, {Action, Files}} -> - attempt_action( - Action, Files, - State #state { pending_no_readers = - dict:erase(File, Pending) }) - end, - {noreply, State1, hibernate}; + {noreply, case dict:find(File, Pending) of + error -> + State; + {ok, {Action, Files}} -> + Pending1 = dict:erase(File, Pending), + attempt_action( + Action, Files, + State #state { pending_no_readers = Pending1 }) + end, hibernate}; handle_cast({set_maximum_since_use, Age}, State) -> ok = file_handle_cache:set_maximum_since_use(Age), |