diff options
| -rw-r--r-- | src/rabbit_networking.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rabbit_networking.erl b/src/rabbit_networking.erl index f95f8c5818..972b2e31cf 100644 --- a/src/rabbit_networking.erl +++ b/src/rabbit_networking.erl @@ -21,7 +21,7 @@ node_listeners/1, register_connection/1, unregister_connection/1, connections/0, connection_info_keys/0, connection_info/1, connection_info/2, - connection_info_all/0, connection_info_all/1, + connection_info_all/0, connection_info_all/1, connection_info_all/3, close_connection/2, force_connection_event_refresh/1, tcp_host/1]). %%used by TCP-based transports, e.g. STOMP adapter @@ -82,6 +82,8 @@ -spec(connection_info_all/0 :: () -> [rabbit_types:infos()]). -spec(connection_info_all/1 :: (rabbit_types:info_keys()) -> [rabbit_types:infos()]). +-spec(connection_info_all/3 :: + (rabbit_types:info_keys(), reference(), pid()) -> 'ok'). -spec(close_connection/2 :: (pid(), string()) -> 'ok'). -spec(force_connection_event_refresh/1 :: (reference()) -> 'ok'). @@ -440,6 +442,11 @@ connection_info(Pid, Items) -> rabbit_reader:info(Pid, Items). connection_info_all() -> cmap(fun (Q) -> connection_info(Q) end). connection_info_all(Items) -> cmap(fun (Q) -> connection_info(Q, Items) end). +connection_info_all(Items, Ref, Pid) -> + cmap(fun (Q) -> Pid ! {Ref, connection_info(Q, Items)} end), + Pid ! {Ref, finished}, + ok. + close_connection(Pid, Explanation) -> rabbit_log:info("Closing connection ~p because ~p~n", [Pid, Explanation]), case lists:member(Pid, connections()) of |
