mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Remove the next_request function always matching its first clause.
This commit is contained in:
parent
20293be912
commit
c044fa9602
1 changed files with 1 additions and 7 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue