0
Fork 0
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:
Loïc Hoguin 2016-06-06 17:28:35 +02:00
parent 61e9f29279
commit 8e9196215d

View file

@ -432,6 +432,10 @@ commands(State, StreamID, [{flow, _Size}|Tail]) ->
%% Supervise a child process.
commands(State=#state{children=Children}, StreamID, [{spawn, Pid, _Shutdown}|Tail]) -> %% @todo Shutdown
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.
%%
%% @todo Implementation.