diff options
Diffstat (limited to 'src/cowboy_rest.erl')
-rw-r--r-- | src/cowboy_rest.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowboy_rest.erl b/src/cowboy_rest.erl index a6c3672..9e5904c 100644 --- a/src/cowboy_rest.erl +++ b/src/cowboy_rest.erl @@ -897,7 +897,7 @@ respond(Req, State, StatusCode) -> terminate(Req, #state{handler=Handler, handler_state=HandlerState}) -> case erlang:function_exported(Handler, rest_terminate, 2) of true -> ok = Handler:rest_terminate( - Req#http_req{resp_state=locked}, HandlerState); + cowboy_req:lock(Req), HandlerState); false -> ok end, {ok, Req}. |