diff options
Diffstat (limited to 'src/cowboy_acceptors_sup.erl')
-rw-r--r-- | src/cowboy_acceptors_sup.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cowboy_acceptors_sup.erl b/src/cowboy_acceptors_sup.erl index 3fbffb1..f5b2de3 100644 --- a/src/cowboy_acceptors_sup.erl +++ b/src/cowboy_acceptors_sup.erl @@ -32,8 +32,9 @@ start_link(NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts, ReqsPid) -> -spec init(list(term())) -> term(). %% @todo These specs should be improved. init([NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts, ReqsPid]) -> {ok, LSocket} = Transport:listen(TransOpts), + MaxConns = proplists:get_value(max_connections, TransOpts, 1024), Procs = [{{acceptor, self(), N}, {cowboy_acceptor, start_link, [ - LSocket, Transport, Protocol, ProtoOpts, ReqsPid + LSocket, Transport, Protocol, ProtoOpts, MaxConns, ReqsPid ]}, permanent, brutal_kill, worker, dynamic} || N <- lists:seq(1, NbAcceptors)], {ok, {{one_for_one, 10, 10}, Procs}}. |