summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_binding.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/rabbit_binding.erl b/src/rabbit_binding.erl
index a7730a1a..2e462354 100644
--- a/src/rabbit_binding.erl
+++ b/src/rabbit_binding.erl
@@ -285,13 +285,7 @@ remove_for_destination(DstName) ->
remove_for_destination(DstName, fun remove_routes/1).
remove_transient_for_destination(DstName) ->
- remove_for_destination(
- DstName, fun (Routes) ->
- [begin
- ok = sync_transient_route(R, fun delete_object/3),
- R#route.binding
- end || R <- Routes]
- end).
+ remove_for_destination(DstName, fun remove_transient_routes/1).
%%----------------------------------------------------------------------------
@@ -391,6 +385,12 @@ remove_routes(Routes) ->
R <- DurableRoutes],
[R#route.binding || R <- Routes].
+remove_transient_routes(Routes) ->
+ [begin
+ ok = sync_transient_route(R, fun delete_object/3),
+ R#route.binding
+ end || R <- Routes].
+
remove_for_destination(DstName, Fun) ->
lock_route_tables(),
Match = reverse_route(