From 0c7eba3c836953a4fcf722bbbe6f376ee2ef5956 Mon Sep 17 00:00:00 2001 From: Simon MacMullen Date: Wed, 23 Mar 2011 15:26:49 +0000 Subject: Only return the queue the second time round and thus don't call XT:add_binding(#amqqueue{}, ...). --- src/rabbit_amqqueue.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index 102ea13b33..80dcb79a4a 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -214,7 +214,13 @@ internal_declare(Q = #amqqueue{name = QueueName}, false) -> case mnesia:read({rabbit_durable_queue, QueueName}) of [] -> ok = store_queue(Q), B = add_default_binding(Q), - fun (Tx) -> B(Tx), Q end; + fun (Tx) -> + R = B(Tx), + case Tx of + transaction -> R; + _ -> Q + end + end; %% Q exists on stopped node [_] -> rabbit_misc:const(not_found) end; -- cgit v1.2.1