diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2011-04-06 15:23:04 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2011-04-06 15:23:04 +0100 |
| commit | ae65bc19d4e11e5d7f61ab6d8660ab26592f11d7 (patch) | |
| tree | 64047fd4fc8bc663b586059fbc7213e3f5c7c731 | |
| parent | 564c485de0d9355b8a55dcb3187ae4651a607cf4 (diff) | |
| download | rabbitmq-server-git-ae65bc19d4e11e5d7f61ab6d8660ab26592f11d7.tar.gz | |
Check the route still exists.
| -rw-r--r-- | src/rabbit_binding.erl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/rabbit_binding.erl b/src/rabbit_binding.erl index d293c8124d..7131ab21e6 100644 --- a/src/rabbit_binding.erl +++ b/src/rabbit_binding.erl @@ -115,12 +115,15 @@ recover(XNames, QNames) -> none, rabbit_durable_route), ok. -should_recover(#binding{destination = Dst = #resource{ kind = Kind }}, +should_recover(B = #binding{destination = Dst = #resource{ kind = Kind }}, XNameSet, QNameSet) -> - sets:is_element(Dst, case Kind of - exchange -> XNameSet; - queue -> QNameSet - end). + case mnesia:read({rabbit_durable_route, B}) of + [] -> false; %% It disappeared between getting the list and here + [_] -> sets:is_element(Dst, case Kind of + exchange -> XNameSet; + queue -> QNameSet + end) + end. exists(Binding) -> binding_action( |
