From bf1b84eb83f726d747dc62ec544be6199950f541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 11 Oct 2011 18:12:50 +0200 Subject: Fix a misnamed variable for {loop, ...} returns in init/3 --- src/cowboy_http_protocol.erl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/cowboy_http_protocol.erl') diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl index ef6d227..33c6333 100644 --- a/src/cowboy_http_protocol.erl +++ b/src/cowboy_http_protocol.erl @@ -208,16 +208,16 @@ handler_init(Req, State=#state{listener=ListenerPid, try Handler:init({Transport:name(), http}, Req, Opts) of {ok, Req2, HandlerState} -> handler_handle(HandlerState, Req2, State); - {loop, Req, HandlerState} -> - handler_before_loop(HandlerState, Req, State); - {loop, Req, HandlerState, hibernate} -> - handler_before_loop(HandlerState, Req, + {loop, Req2, HandlerState} -> + handler_before_loop(HandlerState, Req2, State); + {loop, Req2, HandlerState, hibernate} -> + handler_before_loop(HandlerState, Req2, State#state{hibernate=true}); - {loop, Req, HandlerState, Timeout} -> - handler_before_loop(HandlerState, Req, + {loop, Req2, HandlerState, Timeout} -> + handler_before_loop(HandlerState, Req2, State#state{loop_timeout=Timeout}); - {loop, Req, HandlerState, Timeout, hibernate} -> - handler_before_loop(HandlerState, Req, + {loop, Req2, HandlerState, Timeout, hibernate} -> + handler_before_loop(HandlerState, Req2, State#state{hibernate=true, loop_timeout=Timeout}); {shutdown, Req2, HandlerState} -> handler_terminate(HandlerState, Req2, State); -- cgit v1.2.3