aboutsummaryrefslogtreecommitdiffstats
path: root/src/ranch_sup.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-08-06 14:35:05 +0200
committerLoïc Hoguin <[email protected]>2012-08-06 14:35:05 +0200
commitb186d01367a1a744f6195e071611f97f9cc88f8e (patch)
tree49dc72e64317b5fd92297f9d4a9a530896f3c290 /src/ranch_sup.erl
parenteabb029895c8345ccedc41ed28a023d0e75c7e0e (diff)
downloadranch-b186d01367a1a744f6195e071611f97f9cc88f8e.tar.gz
ranch-b186d01367a1a744f6195e071611f97f9cc88f8e.tar.bz2
ranch-b186d01367a1a744f6195e071611f97f9cc88f8e.zip
Make ranch_sup the owner of the ranch_server ets table
Should prove itself more robust when things go wrong.
Diffstat (limited to 'src/ranch_sup.erl')
-rw-r--r--src/ranch_sup.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ranch_sup.erl b/src/ranch_sup.erl
index ff05194..ad1c558 100644
--- a/src/ranch_sup.erl
+++ b/src/ranch_sup.erl
@@ -33,6 +33,8 @@ start_link() ->
%% supervisor.
init([]) ->
+ ranch_server = ets:new(ranch_server, [
+ ordered_set, public, named_table, {write_concurrency, true}]),
Procs = [
{ranch_server, {ranch_server, start_link, []},
permanent, 5000, worker, [ranch_server]}