diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl index 3a8aac79..d3d41f93 100644 --- a/src/cowboy_http_protocol.erl +++ b/src/cowboy_http_protocol.erl @@ -118,8 +118,7 @@ handler_loop(Req, State=#state{handler={Handler, Opts}}) -> -spec error_terminate(Code::http_status(), State::#state{}) -> ok. error_terminate(Code, State) -> - reply(Code, [], [], State#state{connection=close}), - terminate(State). + reply(Code, [], [], State#state{connection=close}). -spec terminate(State::#state{}) -> ok. terminate(#state{socket=Socket, transport=Transport}) ->