diff options
| author | Matthias Radestock <matthias@lshift.net> | 2010-02-10 09:40:16 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2010-02-10 09:40:16 +0000 |
| commit | 7a3aa2a1fd9edeb5089f8e103f9bf91b37488541 (patch) | |
| tree | f2f00ac32b24bf131e2ea09c8da1b663910d7a71 | |
| parent | 709069603086704267055ea50b22a19b47c748aa (diff) | |
| parent | c2e9b8c88a0d16fd283365f07aa6adfd0e0b0a58 (diff) | |
| download | rabbitmq-server-git-7a3aa2a1fd9edeb5089f8e103f9bf91b37488541.tar.gz | |
merge default into bug21673
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index d4de6bfdf4..8087040560 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -746,10 +746,10 @@ handle_call({basic_cancel, ChPid, ConsumerTag, OkMsg}, _From, reply(ok, State); C = #cr{consumer_count = ConsumerCount, limiter_pid = LimiterPid} -> store_ch_record(C#cr{consumer_count = ConsumerCount - 1}), - ok = case ConsumerCount of - 1 -> rabbit_limiter:unregister(LimiterPid, self()); - _ -> ok - end, + case ConsumerCount of + 1 -> ok = rabbit_limiter:unregister(LimiterPid, self()); + _ -> ok + end, ok = maybe_send_reply(ChPid, OkMsg), NewState = State#q{exclusive_consumer = cancel_holder(ChPid, @@ -805,9 +805,8 @@ handle_call({claim_queue, ReaderPid}, _From, %% pid... reply(locked, State); ok -> - reply(ok, - State#q{ owner = {ReaderPid, erlang:monitor( - process, ReaderPid)} }) + MonitorRef = erlang:monitor(process, ReaderPid), + reply(ok, State#q{owner = {ReaderPid, MonitorRef}}) end; {ReaderPid, _MonitorRef} -> reply(ok, State); |
