Extract rabbit_networking:stop_ranch_listener_of_protocol/1
Part of rabbitmq/rabbitmq-server#2321
This commit is contained in:
parent
73b02e6845
commit
b8565fe555
|
|
@ -60,8 +60,8 @@ init() ->
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
stop(State) ->
|
stop(State) ->
|
||||||
stop_ranch_listener(?TCP_PROTOCOL),
|
rabbit_networking:stop_ranch_listener_of_protocol(?TCP_PROTOCOL),
|
||||||
stop_ranch_listener(?TLS_PROTOCOL),
|
rabbit_networking:stop_ranch_listener_of_protocol(?TLS_PROTOCOL),
|
||||||
State.
|
State.
|
||||||
|
|
||||||
-spec list_connections() -> [pid()].
|
-spec list_connections() -> [pid()].
|
||||||
|
|
@ -82,13 +82,6 @@ close_all_client_connections(Reason) ->
|
||||||
%% Implementation
|
%% Implementation
|
||||||
%%
|
%%
|
||||||
|
|
||||||
stop_ranch_listener(Protocol) ->
|
|
||||||
case rabbit_networking:ranch_ref_of_protocol(Protocol) of
|
|
||||||
{error, not_found} -> ok;
|
|
||||||
undefined -> ok;
|
|
||||||
Ref -> ranch:stop_listener(Ref)
|
|
||||||
end.
|
|
||||||
|
|
||||||
connection_pids_of_protocol(Protocol) ->
|
connection_pids_of_protocol(Protocol) ->
|
||||||
case rabbit_networking:ranch_ref_of_protocol(Protocol) of
|
case rabbit_networking:ranch_ref_of_protocol(Protocol) of
|
||||||
undefined -> [];
|
undefined -> [];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue