diff options
author | Loïc Hoguin <[email protected]> | 2011-05-25 23:02:40 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2011-05-25 23:02:40 +0200 |
commit | 3e55cb62c9053895412b1cf2a65d54ef90eda34c (patch) | |
tree | 0ac9963ba35359b928a594fbde02564e5893daea /src/cowboy.erl | |
parent | 0720d6b9e3c8655b6222a84a2f37fcab04b3dd94 (diff) | |
download | cowboy-3e55cb62c9053895412b1cf2a65d54ef90eda34c.tar.gz cowboy-3e55cb62c9053895412b1cf2a65d54ef90eda34c.tar.bz2 cowboy-3e55cb62c9053895412b1cf2a65d54ef90eda34c.zip |
Refresh the type specifications.
Following discussions on #erlounge.
Also fixes compilation in R14B03 and fixes a few underspecs
dialyzer warnings.
Diffstat (limited to 'src/cowboy.erl')
-rw-r--r-- | src/cowboy.erl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cowboy.erl b/src/cowboy.erl index 6aa5786..a1e8063 100644 --- a/src/cowboy.erl +++ b/src/cowboy.erl @@ -17,9 +17,8 @@ %% API. --spec start_listener(Ref::term(), NbAcceptors::non_neg_integer(), - Transport::module(), TransOpts::term(), Protocol::module(), - ProtoOpts::term()) -> {ok, Pid::pid()}. +-spec start_listener(any(), non_neg_integer(), module(), any(), module(), any()) + -> {ok, pid()}. start_listener(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts) -> supervisor:start_child(cowboy_sup, {{cowboy_listener_sup, Ref}, {cowboy_listener_sup, start_link, [ @@ -27,7 +26,7 @@ start_listener(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts) -> ]}, permanent, 5000, supervisor, [cowboy_listener_sup]}). --spec stop_listener(Ref::term()) -> ok | {error, not_found}. +-spec stop_listener(any()) -> ok | {error, not_found}. stop_listener(Ref) -> case supervisor:terminate_child(cowboy_sup, {cowboy_listener_sup, Ref}) of ok -> |