diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2011-04-08 20:08:45 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2011-04-08 20:08:45 +0100 |
commit | 98a8472c6f52abb6dcd198ed07a395d337cf35fa (patch) | |
tree | 922fee32dc14e72b0626ec2a987739712eca01f8 | |
parent | 499a08ca8c8288caf3cb73bcf04e00de463f655d (diff) | |
download | rabbitmq-server-98a8472c6f52abb6dcd198ed07a395d337cf35fa.tar.gz |
remove duplicate check
rabbit_misc:table_filter already filters out elements which have
disappeared.
-rw-r--r-- | src/rabbit_binding.erl | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/rabbit_binding.erl b/src/rabbit_binding.erl index ca7be59a..7d13ea29 100644 --- a/src/rabbit_binding.erl +++ b/src/rabbit_binding.erl @@ -98,15 +98,12 @@ recover(XNames, QNames) -> XNameSet = sets:from_list(XNames), QNameSet = sets:from_list(QNames), rabbit_misc:table_filter( - fun (#route{binding = B = #binding{destination = Dst = - #resource{kind = Kind}}}) -> - %% The check against rabbit_durable_route is in case it - %% disappeared between getting the list and here + fun (#route{binding = #binding{destination = Dst = + #resource{kind = Kind}}}) -> sets:is_element(Dst, case Kind of exchange -> XNameSet; queue -> QNameSet - end) andalso - mnesia:read({rabbit_durable_route, B}) =/= [] + end) end, fun (R = #route{binding = B = #binding{source = Src}}, Tx) -> case Tx of |