diff options
author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-02-07 22:52:49 +0000 |
---|---|---|
committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-02-07 22:52:49 +0000 |
commit | 73d09509763dc07a6fb1f0aaa4ff40c048133637 (patch) | |
tree | a6022b85ee4da8c2e7fb928a622b39f2e767d5e7 | |
parent | 6d2c0df52eb7be228a1fd289c71b8e665a73470e (diff) | |
download | rabbitmq-server-bug22698.tar.gz |
remove listeners when the rabbit application is stoppedbug22698
-rw-r--r-- | src/rabbit_node_monitor.erl | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl index 0f573309..228783de 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). |