Skip to content

Commit c4bba00

Browse files
committed
Remove rabbit_stream:kill_connection/1
This function was not called from anywhere and was the only place that expected stream connections to be registered in pg_local.
1 parent 4d8631d commit c4bba00

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

deps/rabbitmq_stream/src/rabbit_stream.erl

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
host/0,
2323
tls_host/0,
2424
port/0,
25-
tls_port/0,
26-
kill_connection/1]).
25+
tls_port/0]).
2726
-export([stop/1]).
2827
-export([emit_connection_info_local/3,
2928
emit_connection_info_all/4,
@@ -132,20 +131,6 @@ tls_port_from_listener() ->
132131
stop(_State) ->
133132
ok.
134133

135-
kill_connection(ConnectionName) ->
136-
ConnectionNameBin = rabbit_data_coercion:to_binary(ConnectionName),
137-
lists:foreach(fun(ConnectionPid) ->
138-
ConnectionPid ! {infos, self()},
139-
receive
140-
{ConnectionPid,
141-
#{<<"connection_name">> := ConnectionNameBin}} ->
142-
exit(ConnectionPid, kill);
143-
{ConnectionPid, _ClientProperties} -> ok
144-
after 1000 -> ok
145-
end
146-
end,
147-
pg_local:get_members(rabbit_stream_connections)).
148-
149134
emit_connection_info_all(Nodes, Items, Ref, AggregatorPid) ->
150135
Pids =
151136
[spawn_link(Node,

deps/rabbitmq_stream/src/rabbit_stream_reader.erl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,6 @@ transition_to_opened(Transport,
470470
Configuration,
471471
NewConnection,
472472
NewConnectionState) ->
473-
% TODO remove registration to rabbit_stream_connections
474-
% just meant to be able to close the connection remotely
475-
% should be possible once the connections are available in ctl list_connections
476-
pg_local:join(rabbit_stream_connections, self()),
477473
Connection1 =
478474
rabbit_event:init_stats_timer(NewConnection,
479475
#stream_connection.stats_timer),

0 commit comments

Comments
 (0)