From aa64151149e947145728a1f1339c689f1100720e Mon Sep 17 00:00:00 2001 From: juhlig Date: Mon, 6 May 2019 11:30:20 +0200 Subject: Retrieve the conns_sup in the acceptor start function With the resolution of the pid of a conns_sup in acceptors_sup and thus in the child spec, a crash of a conns_sup and subsequent crash of the associated acceptor causes restarts of the acceptor to fail. --- src/ranch_acceptors_sup.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ranch_acceptors_sup.erl') diff --git a/src/ranch_acceptors_sup.erl b/src/ranch_acceptors_sup.erl index e320633..f96b19b 100644 --- a/src/ranch_acceptors_sup.erl +++ b/src/ranch_acceptors_sup.erl @@ -43,7 +43,7 @@ init([Ref, NumAcceptors, Transport]) -> ranch_server:set_addr(Ref, Addr), Procs = [ {{acceptor, self(), N}, {ranch_acceptor, start_link, [ - LSocket, Transport, Logger, ranch_server:get_connections_sup(Ref, N) + Ref, N, LSocket, Transport, Logger ]}, permanent, brutal_kill, worker, []} || N <- lists:seq(1, NumAcceptors)], {ok, {{one_for_one, 1, 5}, Procs}}. -- cgit v1.2.3