diff options
| author | Matthias Radestock <matthias@lshift.net> | 2010-04-26 20:54:41 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2010-04-26 20:54:41 +0100 |
| commit | 5ac0dae17e7721fc18fdff31fae20fdeed7496d7 (patch) | |
| tree | fce4b46bb919db54fc416ab7528b722002198678 /src | |
| parent | 04df18da4a906194530abdb6d55e5571257e5e3d (diff) | |
| download | rabbitmq-server-git-5ac0dae17e7721fc18fdff31fae20fdeed7496d7.tar.gz | |
cosmetic - less obscure function calls
Unfortunately fun M:F/N only works if M and F are atoms.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index b85bcdcb63..8557cb947f 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -121,13 +121,14 @@ init([Q]) -> rate_timer_ref = undefined}, hibernate, {backoff, ?HIBERNATE_AFTER_MIN, ?HIBERNATE_AFTER_MIN, ?DESIRED_HIBERNATE}}. -terminate(shutdown, State) -> - terminate_shutdown(terminate, State); -terminate({shutdown, _}, State) -> - terminate_shutdown(terminate, State); -terminate(_Reason, State) -> +terminate(shutdown, State = #q{backing_queue = BQ}) -> + terminate_shutdown(fun (BQS) -> BQ:terminate(BQS) end, State); +terminate({shutdown, _}, State = #q{backing_queue = BQ}) -> + terminate_shutdown(fun (BQS) -> BQ:terminate(BQS) end, State); +terminate(_Reason, State = #q{backing_queue = BQ}) -> %% FIXME: How do we cancel active subscriptions? - State1 = terminate_shutdown(delete_and_terminate, State), + State1 = terminate_shutdown(fun (BQS) -> BQ:delete_and_terminate(BQS) end, + State), ok = rabbit_amqqueue:internal_delete(qname(State1)). code_change(_OldVsn, State, _Extra) -> @@ -148,7 +149,7 @@ terminate_shutdown(Fun, State = #q{backing_queue = BQ, BQ:tx_rollback(Txn, BQSN), BQSN1 end, BQS, all_ch_record()), - State#q{backing_queue_state = BQ:Fun(BQS1)} + State#q{backing_queue_state = Fun(BQS1)} end. reply(Reply, NewState) -> |
