diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2011-03-23 15:26:49 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2011-03-23 15:26:49 +0000 |
commit | 88824c14d55b1e35bc776655c8bb564c0aaee57d (patch) | |
tree | 5ce59beb43b47d5d9023c850ec33199998374d05 | |
parent | 2737c3b1801055190278bff534ebfa590aba8ff9 (diff) | |
download | rabbitmq-server-88824c14d55b1e35bc776655c8bb564c0aaee57d.tar.gz |
Only return the queue the second time round and thus don't call XT:add_binding(#amqqueue{}, ...).
-rw-r--r-- | src/rabbit_amqqueue.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index 102ea13b..80dcb79a 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; |