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 | a89cbd7d20ebea4ad2a8220e488ce0ddf0374695 (patch) | |
| tree | 78502516596da8e935fd0f685d50647f64b867d7 | |
| parent | 04fd38ead9ea5b56f4fab294a3ba8cb2d8a333dd (diff) | |
| download | rabbitmq-server-git-a89cbd7d20ebea4ad2a8220e488ce0ddf0374695.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 cd303f7c47..833222f0e2 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), |
