From 8cbd8c1882e33380875f2723cad258784ba3a360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 7 Nov 2014 19:22:36 +0200 Subject: 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. --- src/cowboy_loop.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cowboy_loop.erl') 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 -> -- cgit v1.2.3