From 9a8409e5c3f4d865611cdc851d3a0515657b6b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 16 May 2013 18:11:58 +0200 Subject: Add ranch:ref() type --- src/ranch_conns_sup.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ranch_conns_sup.erl') diff --git a/src/ranch_conns_sup.erl b/src/ranch_conns_sup.erl index 5555413..2964b8b 100644 --- a/src/ranch_conns_sup.erl +++ b/src/ranch_conns_sup.erl @@ -34,7 +34,7 @@ -record(state, { parent = undefined :: pid(), - ref :: any(), + ref :: ranch:ref(), conn_type :: conn_type(), transport = undefined :: module(), protocol = undefined :: module(), @@ -44,7 +44,7 @@ %% API. --spec start_link(any(), conn_type(), module(), module()) -> {ok, pid()}. +-spec start_link(ranch:ref(), conn_type(), module(), module()) -> {ok, pid()}. start_link(Ref, ConnType, Transport, Protocol) -> proc_lib:start_link(?MODULE, init, [self(), Ref, ConnType, Transport, Protocol]). @@ -92,7 +92,7 @@ active_connections(SupPid) -> %% Supervisor internals. --spec init(pid(), any(), conn_type(), module(), module()) -> no_return(). +-spec init(pid(), ranch:ref(), conn_type(), module(), module()) -> no_return(). init(Parent, Ref, ConnType, Transport, Protocol) -> process_flag(trap_exit, true), ok = ranch_server:set_connections_sup(Ref, self()), -- cgit v1.2.3