From 3e55cb62c9053895412b1cf2a65d54ef90eda34c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 25 May 2011 23:02:40 +0200 Subject: Refresh the type specifications. Following discussions on #erlounge. Also fixes compilation in R14B03 and fixes a few underspecs dialyzer warnings. --- src/cowboy_requests_sup.erl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/cowboy_requests_sup.erl') diff --git a/src/cowboy_requests_sup.erl b/src/cowboy_requests_sup.erl index 8681434..1ad3a52 100644 --- a/src/cowboy_requests_sup.erl +++ b/src/cowboy_requests_sup.erl @@ -20,18 +20,17 @@ %% API. --spec start_link() -> {ok, Pid::pid()}. +-spec start_link() -> {ok, pid()}. start_link() -> supervisor:start_link(?MODULE, []). --spec start_request(Socket::inet:socket(), Transport::module(), - Protocol::module(), Opts::term()) -> {ok, Pid::pid()}. +-spec start_request(inet:socket(), module(), module(), any()) -> {ok, pid()}. start_request(Socket, Transport, Protocol, Opts) -> Protocol:start_link(Socket, Transport, Opts). %% supervisor. --spec init([]) -> term(). %% @todo These specs should be improved. +-spec init([]) -> {ok, {{simple_one_for_one, 0, 1}, [{_, _, _, _, _, _}, ...]}}. init([]) -> {ok, {{simple_one_for_one, 0, 1}, [{?MODULE, {?MODULE, start_request, []}, temporary, brutal_kill, worker, [?MODULE]}]}}. -- cgit v1.2.3