diff options
-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), |