summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_exchange.erl18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/rabbit_exchange.erl b/src/rabbit_exchange.erl
index 4528bdac91..e664168545 100644
--- a/src/rabbit_exchange.erl
+++ b/src/rabbit_exchange.erl
@@ -273,16 +273,14 @@ has_bindings(ExchangeName) ->
MatchHead = #route{binding = #binding{exchange_name = ExchangeName,
queue_name = '$1',
key = '_'}},
- continue(fun() ->
- mnesia:select(route, [{MatchHead, [], ['$1']}], 1, read)
- end).
-
-continue(Fun) ->
- case Fun() of
- '$end_of_table' -> false;
- {[], Cont} -> continue(fun() -> mnesia:select(Cont) end);
- _ -> true
- end.
+ continue(mnesia:select(route, [{MatchHead, [], ['$1']}], 1, read)).
+
+continue('$end_of_table') ->
+ false;
+continue({[], Continuation}) ->
+ continue(mnesia:select(Continuation));
+continue(_) ->
+ true.
call_with_exchange(Exchange, Fun) ->
case mnesia:wread({exchange, Exchange}) of