aboutsummaryrefslogtreecommitdiffstats
path: root/src/ranch_acceptors_sup.erl
diff options
context:
space:
mode:
authorjuhlig <[email protected]>2019-05-06 11:30:20 +0200
committerLoïc Hoguin <[email protected]>2019-05-08 16:36:03 +0200
commitaa64151149e947145728a1f1339c689f1100720e (patch)
tree7566cb891015cdb29bf1a7a3c9739c049c7e4894 /src/ranch_acceptors_sup.erl
parent1062b83bf10ea0b62f590c6ff06ec7ee398cfdb8 (diff)
downloadranch-aa64151149e947145728a1f1339c689f1100720e.tar.gz
ranch-aa64151149e947145728a1f1339c689f1100720e.tar.bz2
ranch-aa64151149e947145728a1f1339c689f1100720e.zip
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.
Diffstat (limited to 'src/ranch_acceptors_sup.erl')
-rw-r--r--src/ranch_acceptors_sup.erl2
1 files changed, 1 insertions, 1 deletions
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}}.