diff options
Diffstat (limited to 'src/cowboy_protocol.erl')
-rw-r--r-- | src/cowboy_protocol.erl | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cowboy_protocol.erl b/src/cowboy_protocol.erl index a5873ea..82f1f38 100644 --- a/src/cowboy_protocol.erl +++ b/src/cowboy_protocol.erl @@ -428,9 +428,7 @@ execute(Req, State, Env, [Middleware|Tail]) -> erlang:hibernate(?MODULE, resume, [State, Env, Tail, Module, Function, Args]); {halt, Req2} -> - next_request(Req2, State, ok); - {error, Code, Req2} -> - error_terminate(Code, Req2, State) + next_request(Req2, State, ok) end. -spec resume(#state{}, cowboy_middleware:env(), [module()], @@ -443,9 +441,7 @@ resume(State, Env, Tail, Module, Function, Args) -> erlang:hibernate(?MODULE, resume, [State, Env, Tail, Module2, Function2, Args2]); {halt, Req2} -> - next_request(Req2, State, ok); - {error, Code, Req2} -> - error_terminate(Code, Req2, State) + next_request(Req2, State, ok) end. -spec next_request(cowboy_req:req(), #state{}, any()) -> ok. |