mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
HTTP/2: Handle internal errors
This commit is contained in:
parent
61e9f29279
commit
8e9196215d
1 changed files with 4 additions and 0 deletions
|
@ -432,6 +432,10 @@ commands(State, StreamID, [{flow, _Size}|Tail]) ->
|
||||||
%% Supervise a child process.
|
%% Supervise a child process.
|
||||||
commands(State=#state{children=Children}, StreamID, [{spawn, Pid, _Shutdown}|Tail]) -> %% @todo Shutdown
|
commands(State=#state{children=Children}, StreamID, [{spawn, Pid, _Shutdown}|Tail]) -> %% @todo Shutdown
|
||||||
commands(State#state{children=[{Pid, StreamID}|Children]}, StreamID, Tail);
|
commands(State#state{children=[{Pid, StreamID}|Children]}, StreamID, Tail);
|
||||||
|
%% Error handling.
|
||||||
|
commands(State, StreamID, [Error = {internal_error, _, _}|Tail]) ->
|
||||||
|
%% @todo Only reset when the stream still exists.
|
||||||
|
commands(stream_reset(State, StreamID, Error), StreamID, Tail);
|
||||||
%% Upgrade to a new protocol.
|
%% Upgrade to a new protocol.
|
||||||
%%
|
%%
|
||||||
%% @todo Implementation.
|
%% @todo Implementation.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue