diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2012-03-01 15:34:15 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2012-03-01 15:34:15 +0000 |
commit | 59c38ca577cdbd873ccd6a68142ec22c992cf73a (patch) | |
tree | e8421a77dc42e7146fd305664bccc2317feec90d | |
parent | e0aabc5b31317533dfbb5d39458b538537293d3d (diff) | |
download | rabbitmq-server-59c38ca577cdbd873ccd6a68142ec22c992cf73a.tar.gz |
In fact, let's not call handle_ch_down in the case where we get a 'DOWN' while waiting to stop.bug24768
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index be02b761..b8b27443 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -1343,11 +1343,9 @@ handle_cast({dead_letter, {Msg, AckTag}, Reason}, State) -> %% We need to not ignore this as we need to remove outstanding %% confirms due to queue death. -handle_info({'DOWN', _MonitorRef, process, DownPid, Reason}, State) -> - case handle_ch_down(DownPid, State) of - {ok, State1} -> handle_queue_down(DownPid, Reason, State1); - {stop, State1} -> stop_later(normal, State1) - end; +handle_info({'DOWN', _MonitorRef, process, DownPid, Reason}, + State = #q{delayed_stop = DS}) when DS =/= undefined -> + handle_queue_down(DownPid, Reason, State); handle_info(_, State = #q{delayed_stop = DS}) when DS =/= undefined -> noreply(State); @@ -1378,6 +1376,12 @@ handle_info({'DOWN', _MonitorRef, process, DownPid, _Reason}, %% unexpectedly. stop_later(normal, State); +handle_info({'DOWN', _MonitorRef, process, DownPid, Reason}, State) -> + case handle_ch_down(DownPid, State) of + {ok, State1} -> handle_queue_down(DownPid, Reason, State1); + {stop, State1} -> stop_later(normal, State1) + end; + handle_info(update_ram_duration, State = #q{backing_queue = BQ, backing_queue_state = BQS}) -> {RamDuration, BQS1} = BQ:ram_duration(BQS), |