diff options
author | Loïc Hoguin <[email protected]> | 2014-11-07 19:22:36 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-11-07 19:22:36 +0200 |
commit | 8cbd8c1882e33380875f2723cad258784ba3a360 (patch) | |
tree | e04ee8ab09bffcfe8c8bab25e509b626dc42be24 /src/cowboy_loop.erl | |
parent | 903f6f4c7d7aca0432e8f8ac3c1790e82b1428fd (diff) | |
download | cowboy-8cbd8c1882e33380875f2723cad258784ba3a360.tar.gz cowboy-8cbd8c1882e33380875f2723cad258784ba3a360.tar.bz2 cowboy-8cbd8c1882e33380875f2723cad258784ba3a360.zip |
Rename 'shutdown' close reason and tuples to 'stop'
The 'shutdown' atom has a specific meaning inside OTP. We are
instead going to use 'stop' which is pretty much the equivalent
of what we actually do. 'shutdown' is now reserved for future
special processes implementation.
Diffstat (limited to 'src/cowboy_loop.erl')
-rw-r--r-- | src/cowboy_loop.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cowboy_loop.erl b/src/cowboy_loop.erl index b9eb8cd..8920299 100644 --- a/src/cowboy_loop.erl +++ b/src/cowboy_loop.erl @@ -36,7 +36,7 @@ -callback info(any(), Req, State) -> {ok, Req, State} | {ok, Req, State, hibernate} - | {shutdown, Req, State} + | {stop, Req, State} when Req::cowboy_req:req(), State::any(). %% @todo optional -callback terminate(terminate_reason(), cowboy_req:req(), state()) -> ok. @@ -153,8 +153,8 @@ call(Req, State=#state{resp_sent=RespSent}, after_call(Req2, State, Handler, HandlerState2); {ok, Req2, HandlerState2, hibernate} -> after_call(Req2, State#state{hibernate=true}, Handler, HandlerState2); - {shutdown, Req2, HandlerState2} -> - after_loop(Req2, State, Handler, HandlerState2, shutdown) + {stop, Req2, HandlerState2} -> + after_loop(Req2, State, Handler, HandlerState2, stop) catch Class:Reason -> Stacktrace = erlang:get_stacktrace(), if RespSent -> ok; true -> |