0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Notify the client that we're closing the connection after the error reply.

This commit is contained in:
Loïc Hoguin 2011-03-19 02:21:55 +01:00
parent 408f167621
commit 2131a935e6

View file

@ -139,10 +139,9 @@ handler_terminate(HandlerState, Req, State=#state{handler={Handler, _Opts}}) ->
end.
-spec error_terminate(Code::http_status(), State::#state{}) -> ok.
error_terminate(Code, State=#state{socket=Socket, transport=Transport,
connection=Connection}) ->
error_terminate(Code, State=#state{socket=Socket, transport=Transport}) ->
cowboy_http_req:reply(Code, [], [], #http_req{socket=Socket,
transport=Transport, connection=Connection}),
transport=Transport, connection=close}),
terminate(State).
-spec terminate(State::#state{}) -> ok.