aboutsummaryrefslogtreecommitdiffstats
path: root/src/ranch_acceptors_sup.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-12-21 17:04:42 +0100
committerLoïc Hoguin <[email protected]>2012-12-21 17:04:42 +0100
commit058ad09e8b2c885a0888bda47459acd32ece917e (patch)
treedcbf07093880e6b4315c86336b92236ee310fa72 /src/ranch_acceptors_sup.erl
parent7f4261d1d83dde90be93d3615693b44969f6b446 (diff)
parent66618454e0925ebd46b6905a1957206b2f2663e9 (diff)
downloadranch-058ad09e8b2c885a0888bda47459acd32ece917e.tar.gz
ranch-058ad09e8b2c885a0888bda47459acd32ece917e.tar.bz2
ranch-058ad09e8b2c885a0888bda47459acd32ece917e.zip
Merge branch 'fix/listener_sup_failures' of git://github.com/keynslug/syncranch
Diffstat (limited to 'src/ranch_acceptors_sup.erl')
-rw-r--r--src/ranch_acceptors_sup.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ranch_acceptors_sup.erl b/src/ranch_acceptors_sup.erl
index 1d9503c..f1908a6 100644
--- a/src/ranch_acceptors_sup.erl
+++ b/src/ranch_acceptors_sup.erl
@@ -17,7 +17,7 @@
-behaviour(supervisor).
%% API.
--export([start_link/7]).
+-export([start_link/5]).
%% supervisor.
-export([init/1]).
@@ -25,16 +25,16 @@
%% API.
-spec start_link(any(), non_neg_integer(), module(), any(),
- module(), pid(), pid()) -> {ok, pid()}.
-start_link(Ref, NbAcceptors, Transport, TransOpts,
- Protocol, ListenerPid, ConnsPid) ->
+ module()) -> {ok, pid()}.
+start_link(Ref, NbAcceptors, Transport, TransOpts, Protocol) ->
supervisor:start_link(?MODULE, [Ref, NbAcceptors, Transport, TransOpts,
- Protocol, ListenerPid, ConnsPid]).
+ Protocol]).
%% supervisor.
-init([Ref, NbAcceptors, Transport, TransOpts,
- Protocol, ListenerPid, ConnsPid]) ->
+init([Ref, NbAcceptors, Transport, TransOpts, Protocol]) ->
+ ListenerPid = ranch_server:lookup_listener(Ref),
+ ConnsPid = ranch_server:lookup_connections_sup(Ref),
LSocket = case proplists:get_value(socket, TransOpts) of
undefined ->
{ok, Socket} = Transport:listen(TransOpts),