diff options
Diffstat (limited to 'src/cowboy_protocol.erl')
-rw-r--r-- | src/cowboy_protocol.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowboy_protocol.erl b/src/cowboy_protocol.erl index 04b42a5..ad22141 100644 --- a/src/cowboy_protocol.erl +++ b/src/cowboy_protocol.erl @@ -383,7 +383,7 @@ handler_call(HandlerState, Req, State=#state{handler={Handler, Opts}}, -spec handler_terminate(any(), cowboy_req:req(), #state{}) -> ok. handler_terminate(HandlerState, Req, #state{handler={Handler, Opts}}) -> try - Handler:terminate(Req#http_req{resp_state=locked}, HandlerState) + Handler:terminate(cowboy_req:lock(Req), HandlerState) catch Class:Reason -> PLReq = cowboy_req:to_list(Req), error_logger:error_msg( |