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 | c43939831fdfec64af61631cc3e67195fe46e3cb (patch) | |
| tree | e8421a77dc42e7146fd305664bccc2317feec90d /src | |
| parent | d4435a0928bcb80272131312f8b4a9c87cd449a2 (diff) | |
| download | rabbitmq-server-git-c43939831fdfec64af61631cc3e67195fe46e3cb.tar.gz | |
In fact, let's not call handle_ch_down in the case where we get a 'DOWN' while waiting to stop.
Diffstat (limited to 'src')
| -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 be02b7611b..b8b27443da 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), |
