aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-02-24 08:09:28 -0800
committerLoïc Hoguin <[email protected]>2012-02-24 08:09:28 -0800
commitf7884475a5f9cf580f41a9f146211a5be8523dc3 (patch)
tree5e9be052895a72908aa8f853d7bd3f3d196aa30b
parent5f5d41054146be22f49fa3510d745c3d386bd2e9 (diff)
parentf3de0869801d3909cc5a5d5dbee81941481a0c2e (diff)
downloadcowboy-f7884475a5f9cf580f41a9f146211a5be8523dc3.tar.gz
cowboy-f7884475a5f9cf580f41a9f146211a5be8523dc3.tar.bz2
cowboy-f7884475a5f9cf580f41a9f146211a5be8523dc3.zip
Merge pull request #146 from ostinelli/f3de0869801d3909cc5a5d5dbee81941481a0c2e
Polish dialyzer warnings on supervisor init/1
-rw-r--r--src/cowboy_acceptors_sup.erl8
-rw-r--r--src/cowboy_requests_sup.erl8
-rw-r--r--src/cowboy_sup.erl8
3 files changed, 21 insertions, 3 deletions
diff --git a/src/cowboy_acceptors_sup.erl b/src/cowboy_acceptors_sup.erl
index 625028c..7c962d2 100644
--- a/src/cowboy_acceptors_sup.erl
+++ b/src/cowboy_acceptors_sup.erl
@@ -30,7 +30,13 @@ start_link(NbAcceptors, Transport, TransOpts,
%% supervisor.
--spec init(list()) -> {ok, {{one_for_one, 10, 10}, list()}}.
+-spec init([any()]) -> {'ok', {{'one_for_one', 10, 10}, [{
+ any(), {atom() | tuple(), atom(), 'undefined' | [any()]},
+ 'permanent' | 'temporary' | 'transient',
+ 'brutal_kill' | 'infinity' | non_neg_integer(),
+ 'supervisor' | 'worker',
+ 'dynamic' | [atom() | tuple()]}]
+}}.
init([NbAcceptors, Transport, TransOpts,
Protocol, ProtoOpts, ListenerPid, ReqsPid]) ->
{ok, LSocket} = Transport:listen(TransOpts),
diff --git a/src/cowboy_requests_sup.erl b/src/cowboy_requests_sup.erl
index 87d5352..ddd8d3b 100644
--- a/src/cowboy_requests_sup.erl
+++ b/src/cowboy_requests_sup.erl
@@ -32,7 +32,13 @@ start_request(ListenerPid, Socket, Transport, Protocol, Opts) ->
%% supervisor.
--spec init([]) -> {ok, {{simple_one_for_one, 0, 1}, [{_, _, _, _, _, _}, ...]}}.
+-spec init([]) -> {'ok', {{'simple_one_for_one', 0, 1}, [{
+ any(), {atom() | tuple(), atom(), 'undefined' | [any()]},
+ 'permanent' | 'temporary' | 'transient',
+ 'brutal_kill' | 'infinity' | non_neg_integer(),
+ 'supervisor' | 'worker',
+ 'dynamic' | [atom() | tuple()]}]
+}}.
init([]) ->
{ok, {{simple_one_for_one, 0, 1}, [{?MODULE, {?MODULE, start_request, []},
temporary, brutal_kill, worker, [?MODULE]}]}}.
diff --git a/src/cowboy_sup.erl b/src/cowboy_sup.erl
index 34591bc..502c592 100644
--- a/src/cowboy_sup.erl
+++ b/src/cowboy_sup.erl
@@ -29,7 +29,13 @@ start_link() ->
%% supervisor.
--spec init([]) -> {ok, {{one_for_one, 10, 10}, [{_, _, _, _, _, _}, ...]}}.
+-spec init([]) -> {'ok', {{'one_for_one', 10, 10}, [{
+ any(), {atom() | tuple(), atom(), 'undefined' | [any()]},
+ 'permanent' | 'temporary' | 'transient',
+ 'brutal_kill' | 'infinity' | non_neg_integer(),
+ 'supervisor' | 'worker',
+ 'dynamic' | [atom() | tuple()]}]
+}}.
init([]) ->
Procs = [{cowboy_clock, {cowboy_clock, start_link, []},
permanent, 5000, worker, [cowboy_clock]}],