diff options
author | Loïc Hoguin <[email protected]> | 2011-04-30 01:14:57 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2011-04-30 01:14:57 +0200 |
commit | c044fa9602fb9ef39e8dc2bf28ac44ebb638a265 (patch) | |
tree | 990c3162fee4a1c08972fffecc70067edf689b5b /src | |
parent | 20293be9128fd6ecbb5db9bd40fbd4ca8581a4ce (diff) | |
download | cowboy-c044fa9602fb9ef39e8dc2bf28ac44ebb638a265.tar.gz cowboy-c044fa9602fb9ef39e8dc2bf28ac44ebb638a265.tar.bz2 cowboy-c044fa9602fb9ef39e8dc2bf28ac44ebb638a265.zip |
Remove the next_request function always matching its first clause.
Diffstat (limited to 'src')
-rw-r--r-- | src/cowboy_http_protocol.erl | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl index a25f87a..b68980d 100644 --- a/src/cowboy_http_protocol.erl +++ b/src/cowboy_http_protocol.erl @@ -169,7 +169,7 @@ handler_terminate(HandlerState, Req, State=#state{handler={Handler, _Opts}}) -> BodyRes = ensure_body_processed(Req), ensure_response(Req, State), case {HandlerRes, BodyRes, State#state.connection} of - {ok, ok, keepalive} -> next_request(State); + {ok, ok, keepalive} -> ?MODULE:wait_request(State); _Closed -> terminate(State) end. @@ -210,12 +210,6 @@ terminate(#state{socket=Socket, transport=Transport}) -> Transport:close(Socket), ok. --spec next_request(State::#state{}) -> ok. -next_request(State=#state{connection=keepalive}) -> - ?MODULE:wait_request(State); -next_request(State=#state{connection=close}) -> - terminate(State). - %% Internal. -spec version_to_connection(Version::http_version()) -> keepalive | close. |