diff options
author | James Fish <[email protected]> | 2013-02-17 02:05:53 +0000 |
---|---|---|
committer | James Fish <[email protected]> | 2013-02-17 02:11:45 +0000 |
commit | c42e672dd046ff2a1407b8e57f306b6e3a2eb2b7 (patch) | |
tree | 49be4ca7e07eebe701d605e7c19fb24a5a6dc6a0 | |
parent | 5dec37bb9e38312dcd03cf353d7564a3d9298bbe (diff) | |
download | cowboy-c42e672dd046ff2a1407b8e57f306b6e3a2eb2b7.tar.gz cowboy-c42e672dd046ff2a1407b8e57f306b6e3a2eb2b7.tar.bz2 cowboy-c42e672dd046ff2a1407b8e57f306b6e3a2eb2b7.zip |
Fix {suspend, ...} specs to use atom() for function name
-rw-r--r-- | src/cowboy_handler.erl | 8 |
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 |