diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2014-09-09 16:22:22 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2014-09-09 16:22:22 +0100 |
commit | c243ede4fd2a08e058a4609ca6c747de48902526 (patch) | |
tree | 0644f3905596896ee8e2c49a6334ce77c42ee18f | |
parent | 5a0e34e615827aa8bf24bd0bc85a103a65218ab6 (diff) | |
download | rabbitmq-server-c243ede4fd2a08e058a4609ca6c747de48902526.tar.gz |
Minor simplification.
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 537eaff5..829c5523 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -208,8 +208,9 @@ terminate({shutdown, _} = R, State = #q{backing_queue = BQ}) -> terminate_shutdown(fun (BQS) -> BQ:terminate(R, BQS) end, State); terminate(normal, State) -> %% delete case terminate_shutdown(terminate_delete(true, normal, State), State); +%% If we crashed don't try to clean up the BQS, probably best to leave it. terminate(_Reason, State) -> - terminate_crash(State). + terminate_shutdown(fun (BQS) -> BQS end, State). terminate_delete(EmitStats, Reason, State = #q{q = #amqqueue{name = QName}, @@ -243,12 +244,6 @@ terminate_shutdown(Fun, State) -> State1#q{backing_queue_state = Fun(BQS)} end. -terminate_crash(State = #q{consumers = Consumers}) -> - QName = qname(State), - [emit_consumer_deleted(Ch, CTag, QName) || - {Ch, CTag, _, _, _} <- rabbit_queue_consumers:all(Consumers)], - ok. - code_change(_OldVsn, State, _Extra) -> {ok, State}. |