diff options
| author | Matthew Sackman <matthew@rabbitmq.com> | 2010-12-17 16:42:34 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@rabbitmq.com> | 2010-12-17 16:42:34 +0000 |
| commit | 0552229b651e5e43e22fa13330df7e88b684af71 (patch) | |
| tree | 63006b6875d2e6d987ae3d589e77245dbfe87322 | |
| parent | e263e5bf12f49a22ad6316eba676f32fa9da9aa1 (diff) | |
| download | rabbitmq-server-git-0552229b651e5e43e22fa13330df7e88b684af71.tar.gz | |
Ensure that promoted slaves monitor the queue's exclusive owner
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 4dd48457a3..601f28e306 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -132,8 +132,13 @@ init(Q) -> guid_to_channel = dict:new()}, hibernate, {backoff, ?HIBERNATE_AFTER_MIN, ?HIBERNATE_AFTER_MIN, ?DESIRED_HIBERNATE}}. -init_with_backing_queue_state(Q, BQ, BQS, RateTRef, AckTags, Deliveries) -> +init_with_backing_queue_state(Q = #amqqueue{exclusive_owner = Owner}, BQ, BQS, + RateTRef, AckTags, Deliveries) -> ?LOGDEBUG("Queue starting - ~p~n", [Q]), + case Owner of + none -> ok; + _ -> erlang:monitor(process, Owner) + end, State = requeue_and_run( AckTags, process_args( |
