From 1971c67f48bdf3087cafa2330ec7667582a32f33 Mon Sep 17 00:00:00 2001 From: Simon MacMullen Date: Mon, 17 Sep 2012 14:55:20 +0100 Subject: Increase the amount of symmetry. --- src/rabbit_binding.erl | 14 +++++++------- 1 file 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( -- cgit v1.2.1