summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2010-06-09 14:11:14 +0100
committerSimon MacMullen <simon@rabbitmq.com>2010-06-09 14:11:14 +0100
commit3dc229946d4d007a3103485ad17c0dafc68110df (patch)
tree4ed7c7016cbbd40e71f32cf498b9b09ecdd67922
parente677648bec3112a9660d7d360fcad6702866ed5a (diff)
downloadrabbitmq-server-3dc229946d4d007a3103485ad17c0dafc68110df.tar.gz
might as well do the reply first thing, before the case.
-rw-r--r--src/rabbit_amqqueue_process.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index eccd226b..db836757 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -717,6 +717,7 @@ handle_call(purge, _From, State = #q{backing_queue = BQ,
reply({ok, Count}, State#q{backing_queue_state = BQS1});
handle_call({requeue, AckTags, ChPid}, From, State) ->
+ gen_server2:reply(From, ok),
case lookup_ch(ChPid) of
not_found ->
rabbit_log:warning("Ignoring requeue from unknown ch: ~p~n",
@@ -725,7 +726,6 @@ handle_call({requeue, AckTags, ChPid}, From, State) ->
C = #cr{acktags = ChAckTags} ->
ChAckTags1 = subtract_acks(ChAckTags, AckTags),
store_ch_record(C#cr{acktags = ChAckTags1}),
- gen_server2:reply(From, ok),
noreply(requeue_and_run(AckTags, State))
end;