diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2011-08-01 15:01:06 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2011-08-01 15:01:06 +0100 |
commit | 0798dfad95793219c5ee53b81decbc451252e636 (patch) | |
tree | 9b5992eab7404cacc1dc853c5e1b552465f31bff /src/rabbit_networking.erl | |
parent | e2c57c78fcc0281eeb78dd1914287e539265244c (diff) | |
download | rabbitmq-server-0798dfad95793219c5ee53b81decbc451252e636.tar.gz |
Introduce rabbit:force_event_refresh which will:
* Emit a foo_exists for every foo that can emit foo_created
* As a side effect, wake everything up and thus send out foo_stats events too.
Currently this doesn't work for direct connections (rather more fiddly), but it does for everything else.
Diffstat (limited to 'src/rabbit_networking.erl')
-rw-r--r-- | src/rabbit_networking.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rabbit_networking.erl b/src/rabbit_networking.erl index 451e56e8..a75a5fc0 100644 --- a/src/rabbit_networking.erl +++ b/src/rabbit_networking.erl @@ -21,7 +21,7 @@ node_listeners/1, connections/0, connection_info_keys/0, connection_info/1, connection_info/2, connection_info_all/0, connection_info_all/1, - close_connection/2]). + close_connection/2, force_connection_event_refresh/0]). %%used by TCP-based transports, e.g. STOMP adapter -export([check_tcp_listener_address/2, @@ -69,6 +69,8 @@ -spec(connection_info_all/1 :: (rabbit_types:info_keys()) -> [rabbit_types:infos()]). -spec(close_connection/2 :: (pid(), string()) -> 'ok'). +-spec(force_connection_event_refresh/0 :: () -> 'ok'). + -spec(on_node_down/1 :: (node()) -> 'ok'). -spec(check_tcp_listener_address/2 :: (atom(), listener_config()) -> [{inet:ip_address(), ip_port(), family(), atom()}]). @@ -289,6 +291,9 @@ close_connection(Pid, Explanation) -> false -> throw({error, {not_a_connection_pid, Pid}}) end. +force_connection_event_refresh() -> + cmap(fun (C) -> rabbit_reader:force_event_refresh(C) end). + %%-------------------------------------------------------------------- tcp_host({0,0,0,0}) -> |