diff options
author | Matthew Sackman <matthew@rabbitmq.com> | 2011-05-17 11:14:36 +0100 |
---|---|---|
committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-05-17 11:14:36 +0100 |
commit | 04c6113a9f40b08868b4c32cd1467002d849722c (patch) | |
tree | 294b455c6bdce58625fd33dd2189c91c9362abf0 /src/rabbit_amqqueue.erl | |
parent | e250d532c13f87c938653812ced8721e5eb3259d (diff) | |
download | rabbitmq-server-04c6113a9f40b08868b4c32cd1467002d849722c.tar.gz |
Not especially happy with this but can't think of how else to solve this. If the queue has mirrors then you may well find that during death you try to contact a dead queue process, because the mnesia table is yet to be updated. In such cases, loop.
Diffstat (limited to 'src/rabbit_amqqueue.erl')
-rw-r--r-- | src/rabbit_amqqueue.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index d79fe9df..534d1002 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -256,8 +256,13 @@ lookup(Name) -> with(Name, F, E) -> case lookup(Name) of - {ok, Q} -> rabbit_misc:with_exit_handler(E, fun () -> F(Q) end); - {error, not_found} -> E() + {ok, Q = #amqqueue{mirror_pids = []}} -> + rabbit_misc:with_exit_handler(E, fun () -> F(Q) end); + {ok, Q} -> + E1 = fun () -> with(Name, F, E) end, + rabbit_misc:with_exit_handler(E1, fun () -> F(Q) end); + {error, not_found} -> + E() end. with(Name, F) -> |