diff options
author | Loïc Hoguin <[email protected]> | 2016-06-06 17:28:35 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-06-06 17:28:35 +0200 |
commit | 8e9196215d8b432f074bacfae2f82f1716114a9f (patch) | |
tree | 4a9dfcb10de4e0e2b1409c596ed4996689b8c7b6 | |
parent | 61e9f29279b8a252fefa39a132985e2d05014e4c (diff) | |
download | cowboy-8e9196215d8b432f074bacfae2f82f1716114a9f.tar.gz cowboy-8e9196215d8b432f074bacfae2f82f1716114a9f.tar.bz2 cowboy-8e9196215d8b432f074bacfae2f82f1716114a9f.zip |
HTTP/2: Handle internal errors
-rw-r--r-- | src/cowboy_http2.erl | 4 |
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. |