aboutsummaryrefslogtreecommitdiffstats
path: root/src/ranch_acceptors_sup.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-12-20 18:54:52 +0100
committerLoïc Hoguin <[email protected]>2012-12-20 19:04:43 +0100
commit7f4261d1d83dde90be93d3615693b44969f6b446 (patch)
tree1705c02f3f19a7e7474c22e91d85cac7440874ab /src/ranch_acceptors_sup.erl
parentf26401af19bddd74ddd1755041372c737a995b01 (diff)
parent036fbd53189f0a43bd8348e517a17da0f00de980 (diff)
downloadranch-7f4261d1d83dde90be93d3615693b44969f6b446.tar.gz
ranch-7f4261d1d83dde90be93d3615693b44969f6b446.tar.bz2
ranch-7f4261d1d83dde90be93d3615693b44969f6b446.zip
Merge branch 'adt-socket-transport-opt' of git://github.com/basho/ranch
Diffstat (limited to 'src/ranch_acceptors_sup.erl')
-rw-r--r--src/ranch_acceptors_sup.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ranch_acceptors_sup.erl b/src/ranch_acceptors_sup.erl
index 2e45acf..1d9503c 100644
--- a/src/ranch_acceptors_sup.erl
+++ b/src/ranch_acceptors_sup.erl
@@ -35,7 +35,13 @@ start_link(Ref, NbAcceptors, Transport, TransOpts,
init([Ref, NbAcceptors, Transport, TransOpts,
Protocol, ListenerPid, ConnsPid]) ->
- {ok, LSocket} = Transport:listen(TransOpts),
+ LSocket = case proplists:get_value(socket, TransOpts) of
+ undefined ->
+ {ok, Socket} = Transport:listen(TransOpts),
+ Socket;
+ Socket ->
+ Socket
+ end,
{ok, {_, Port}} = Transport:sockname(LSocket),
ranch_listener:set_port(ListenerPid, Port),
Procs = [