aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_protocol.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-11-07 20:19:05 +0200
committerLoïc Hoguin <[email protected]>2014-11-07 20:19:05 +0200
commit999dc5b7c1665fb620c14f6303610793313efe58 (patch)
tree8371be2957e20b40fa9b5b93c63e414510e93c2e /src/cowboy_protocol.erl
parent8cbd8c1882e33380875f2723cad258784ba3a360 (diff)
downloadcowboy-999dc5b7c1665fb620c14f6303610793313efe58.tar.gz
cowboy-999dc5b7c1665fb620c14f6303610793313efe58.tar.bz2
cowboy-999dc5b7c1665fb620c14f6303610793313efe58.zip
Rename 'halt' to 'stop' for better consistency
Now everywhere in Cowboy when we want to stop something we return a 'stop' tuple instead of one of the many choices depending on context that we had before. This particular change affects middlewares, sub protocols and REST handlers which were using 'halt' to stop processing.
Diffstat (limited to 'src/cowboy_protocol.erl')
-rw-r--r--src/cowboy_protocol.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_protocol.erl b/src/cowboy_protocol.erl
index 2da3a15..e469bc7 100644
--- a/src/cowboy_protocol.erl
+++ b/src/cowboy_protocol.erl
@@ -431,7 +431,7 @@ execute(Req, State, Env, [Middleware|Tail]) ->
{suspend, Module, Function, Args} ->
erlang:hibernate(?MODULE, resume,
[State, Env, Tail, Module, Function, Args]);
- {halt, Req2} ->
+ {stop, Req2} ->
next_request(Req2, State, ok)
end.
@@ -444,7 +444,7 @@ resume(State, Env, Tail, Module, Function, Args) ->
{suspend, Module2, Function2, Args2} ->
erlang:hibernate(?MODULE, resume,
[State, Env, Tail, Module2, Function2, Args2]);
- {halt, Req2} ->
+ {stop, Req2} ->
next_request(Req2, State, ok)
end.