aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http2.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cowboy_http2.erl')
-rw-r--r--src/cowboy_http2.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cowboy_http2.erl b/src/cowboy_http2.erl
index 4cd9a1b..af2dcc8 100644
--- a/src/cowboy_http2.erl
+++ b/src/cowboy_http2.erl
@@ -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.