summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2011-02-07 22:52:49 +0000
committerAlexandru Scvortov <alexandru@rabbitmq.com>2011-02-07 22:52:49 +0000
commitb1c9b049883dcf1b4a0f13e7b7f288ae8047722c (patch)
treea6022b85ee4da8c2e7fb928a622b39f2e767d5e7 /src
parentfd293acf0f1ea779b51d5897ee26f7fb5ede148a (diff)
downloadrabbitmq-server-git-b1c9b049883dcf1b4a0f13e7b7f288ae8047722c.tar.gz
remove listeners when the rabbit application is stopped
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_node_monitor.erl8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl
index 0f5733093f..228783de05 100644
--- a/src/rabbit_node_monitor.erl
+++ b/src/rabbit_node_monitor.erl
@@ -75,11 +75,11 @@ handle_cast(_Msg, State) ->
handle_info({nodedown, Node}, State) ->
rabbit_log:info("node ~p down~n", [Node]),
- ok = handle_dead_rabbit(Node, true),
+ ok = handle_dead_rabbit(Node),
{noreply, State};
handle_info({'DOWN', _MRef, process, {rabbit, Node}, _Reason}, State) ->
rabbit_log:info("node ~p lost 'rabbit'~n", [Node]),
- ok = handle_dead_rabbit(Node, false),
+ ok = handle_dead_rabbit(Node),
{noreply, State};
handle_info(_Info, State) ->
{noreply, State}.
@@ -95,8 +95,6 @@ code_change(_OldVsn, State, _Extra) ->
%% TODO: This may turn out to be a performance hog when there are
%% lots of nodes. We really only need to execute this code on
%% *one* node, rather than all of them.
-handle_dead_rabbit(Node, true = _TakeDownNetworking) ->
+handle_dead_rabbit(Node) ->
ok = rabbit_networking:on_node_down(Node),
- handle_dead_rabbit(Node, false);
-handle_dead_rabbit(Node, false) ->
ok = rabbit_amqqueue:on_node_down(Node).