aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ranch_acceptors_sup.erl2
-rw-r--r--src/ranch_conns_sup_sup.erl2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/ranch_acceptors_sup.erl b/src/ranch_acceptors_sup.erl
index a1bb8c2..729dea8 100644
--- a/src/ranch_acceptors_sup.erl
+++ b/src/ranch_acceptors_sup.erl
@@ -41,7 +41,7 @@ init([Ref, NumAcceptors, Transport]) ->
shutdown => brutal_kill
}
end || AcceptorId <- lists:seq(1, NumAcceptors)],
- {ok, {#{}, Procs}}.
+ {ok, {#{intensity => 1 + ceil(math:log2(NumAcceptors))}, Procs}}.
-spec start_listen_sockets(any(), pos_integer(), module(), map(), module())
-> [{pos_integer(), inet:socket()}].
diff --git a/src/ranch_conns_sup_sup.erl b/src/ranch_conns_sup_sup.erl
index 334948c..d9fc11d 100644
--- a/src/ranch_conns_sup_sup.erl
+++ b/src/ranch_conns_sup_sup.erl
@@ -32,4 +32,4 @@ init({Ref, NumConnsSups, Transport, Protocol}) ->
start => {ranch_conns_sup, start_link, [Ref, N, Transport, Protocol]},
type => supervisor
} || N <- lists:seq(1, NumConnsSups)],
- {ok, {#{}, ChildSpecs}}.
+ {ok, {#{intensity => 1 + ceil(math:log2(NumConnsSups))}, ChildSpecs}}.