diff --git a/deps/rabbitmq_web_mqtt/src/rabbit_web_mqtt_app.erl b/deps/rabbitmq_web_mqtt/src/rabbit_web_mqtt_app.erl index 0cccdfb14a2a..fc6424ffae4f 100644 --- a/deps/rabbitmq_web_mqtt/src/rabbit_web_mqtt_app.erl +++ b/deps/rabbitmq_web_mqtt/src/rabbit_web_mqtt_app.erl @@ -50,8 +50,8 @@ init([]) -> {ok, {{one_for_one, 1, 5}, []}}. -spec list_connections() -> [pid()]. list_connections() -> - PlainPids = connection_pids_of_protocol(?TCP_PROTOCOL), - TLSPids = connection_pids_of_protocol(?TLS_PROTOCOL), + PlainPids = rabbit_networking:list_local_connections_of_protocol(?TCP_PROTOCOL), + TLSPids = rabbit_networking:list_local_connections_of_protocol(?TLS_PROTOCOL), PlainPids ++ TLSPids. -spec emit_connection_info_all([node()], rabbit_types:info_keys(), reference(), pid()) -> term(). @@ -77,12 +77,6 @@ emit_connection_info(Items, Ref, AggregatorPid, Pids) -> %% Implementation %% -connection_pids_of_protocol(Protocol) -> - case rabbit_networking:ranch_ref_of_protocol(Protocol) of - undefined -> []; - AcceptorRef -> ranch:procs(AcceptorRef, connections) - end. - mqtt_init() -> CowboyOpts0 = maps:from_list(get_env(cowboy_opts, [])), CowboyWsOpts = maps:from_list(get_env(cowboy_ws_opts, [])),