aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-02-17 22:25:19 +0100
committerLoïc Hoguin <[email protected]>2013-02-17 22:25:19 +0100
commit1f59607b7adcff49d2407f53eead75deb4f8b239 (patch)
tree19e7648b4a994caef3af4741f02c1f0b0b7fa293
parentd4ed41e79b55eb1c28d70ab5c922cd498773e52c (diff)
parentc42e672dd046ff2a1407b8e57f306b6e3a2eb2b7 (diff)
downloadcowboy-1f59607b7adcff49d2407f53eead75deb4f8b239.tar.gz
cowboy-1f59607b7adcff49d2407f53eead75deb4f8b239.tar.bz2
cowboy-1f59607b7adcff49d2407f53eead75deb4f8b239.zip
Merge branch 'fix-handler-spec' of git://github.com/fishcakez/cowboy
-rw-r--r--src/cowboy_handler.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cowboy_handler.erl b/src/cowboy_handler.erl
index 3b0af6f..fd2e085 100644
--- a/src/cowboy_handler.erl
+++ b/src/cowboy_handler.erl
@@ -62,7 +62,7 @@ execute(Req, Env) ->
-spec handler_init(Req, #state{}, module(), any())
-> {ok, Req, cowboy_middleware:env()}
- | {error, 500, Req} | {suspend, module(), function(), [any()]}
+ | {error, 500, Req} | {suspend, module(), atom(), [any()]}
when Req::cowboy_req:req().
handler_init(Req, State, Handler, HandlerOpts) ->
Transport = cowboy_req:get(transport, Req),
@@ -137,7 +137,7 @@ handler_handle(Req, State, Handler, HandlerState) ->
%% to receive data and buffer it indefinitely.
-spec handler_before_loop(Req, #state{}, module(), any())
-> {ok, Req, cowboy_middleware:env()}
- | {error, 500, Req} | {suspend, module(), function(), [any()]}
+ | {error, 500, Req} | {suspend, module(), atom(), [any()]}
when Req::cowboy_req:req().
handler_before_loop(Req, State=#state{hibernate=true}, Handler, HandlerState) ->
[Socket, Transport] = cowboy_req:get([socket, transport], Req),
@@ -165,7 +165,7 @@ handler_loop_timeout(State=#state{loop_timeout=Timeout,
%% @private
-spec handler_loop(Req, #state{}, module(), any())
-> {ok, Req, cowboy_middleware:env()}
- | {error, 500, Req} | {suspend, module(), function(), [any()]}
+ | {error, 500, Req} | {suspend, module(), atom(), [any()]}
when Req::cowboy_req:req().
handler_loop(Req, State=#state{loop_buffer_size=NbBytes,
loop_max_buffer=Threshold, loop_timeout_ref=TRef},
@@ -205,7 +205,7 @@ handler_loop(Req, State=#state{loop_buffer_size=NbBytes,
-spec handler_call(Req, #state{}, module(), any(), any())
-> {ok, Req, cowboy_middleware:env()}
- | {error, 500, Req} | {suspend, module(), function(), [any()]}
+ | {error, 500, Req} | {suspend, module(), atom(), [any()]}
when Req::cowboy_req:req().
handler_call(Req, State, Handler, HandlerState, Message) ->
try Handler:info(Message, Req, HandlerState) of