Skip to content

Commit

Permalink
Use supervisor2 specifications in stream connection supervisor
Browse files Browse the repository at this point in the history
The supervisor specifications were dragged from main because
of formatting changes.

References #5956
  • Loading branch information
acogoluegnes committed Oct 4, 2022
1 parent 04e6f19 commit 47a5531
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions deps/rabbitmq_stream/src/rabbit_stream_connection_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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() ->
Expand Down

0 comments on commit 47a5531

Please sign in to comment.