From 47a5531213e5a756a50ebef760d2029a2c42dc13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Cogolu=C3=A8gnes?= Date: Tue, 4 Oct 2022 09:55:55 +0200 Subject: [PATCH] Use supervisor2 specifications in stream connection supervisor The supervisor specifications were dragged from main because of formatting changes. References #5956 --- .../src/rabbit_stream_connection_sup.erl | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/deps/rabbitmq_stream/src/rabbit_stream_connection_sup.erl b/deps/rabbitmq_stream/src/rabbit_stream_connection_sup.erl index bb6f3a845e4d..24dc2e4894d3 100644 --- a/deps/rabbitmq_stream/src/rabbit_stream_connection_sup.erl +++ b/deps/rabbitmq_stream/src/rabbit_stream_connection_sup.erl @@ -29,26 +29,22 @@ start_link(Ref, Transport, Opts) -> {ok, SupPid} = supervisor2:start_link(?MODULE, []), {ok, KeepaliveSup} = supervisor2:start_child(SupPid, - #{id => rabbit_stream_keepalive_sup, - start => - {rabbit_stream_connection_sup, - start_keepalive_link, []}, - restart => transient, - significant => true, - shutdown => infinity, - type => supervisor, - modules => [rabbit_keepalive_sup]}), + {rabbit_stream_keepalive_sup, + {rabbit_stream_connection_sup, + start_keepalive_link, []}, + intrinsic, + infinity, + supervisor, + [rabbit_keepalive_sup]}), {ok, ReaderPid} = supervisor2:start_child(SupPid, - #{id => rabbit_stream_reader, - start => - {rabbit_stream_reader, start_link, - [KeepaliveSup, Transport, Ref, Opts]}, - restart => transient, - significant => true, - shutdown => ?WORKER_WAIT, - type => worker, - modules => [rabbit_stream_reader]}), + {rabbit_stream_reader, + {rabbit_stream_reader, start_link, + [KeepaliveSup, Transport, Ref, Opts]}, + intrinsic, + ?WORKER_WAIT, + worker, + [rabbit_stream_reader]}), {ok, SupPid, ReaderPid}. start_keepalive_link() ->