mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Notify the client that we're closing the connection after the error reply.
This commit is contained in:
parent
408f167621
commit
2131a935e6
1 changed files with 2 additions and 3 deletions
|
@ -139,10 +139,9 @@ handler_terminate(HandlerState, Req, State=#state{handler={Handler, _Opts}}) ->
|
||||||
end.
|
end.
|
||||||
|
|
||||||
-spec error_terminate(Code::http_status(), State::#state{}) -> ok.
|
-spec error_terminate(Code::http_status(), State::#state{}) -> ok.
|
||||||
error_terminate(Code, State=#state{socket=Socket, transport=Transport,
|
error_terminate(Code, State=#state{socket=Socket, transport=Transport}) ->
|
||||||
connection=Connection}) ->
|
|
||||||
cowboy_http_req:reply(Code, [], [], #http_req{socket=Socket,
|
cowboy_http_req:reply(Code, [], [], #http_req{socket=Socket,
|
||||||
transport=Transport, connection=Connection}),
|
transport=Transport, connection=close}),
|
||||||
terminate(State).
|
terminate(State).
|
||||||
|
|
||||||
-spec terminate(State::#state{}) -> ok.
|
-spec terminate(State::#state{}) -> ok.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue