aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_http2.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cowboy_http2.erl b/src/cowboy_http2.erl
index ae5f5b9..6967bb0 100644
--- a/src/cowboy_http2.erl
+++ b/src/cowboy_http2.erl
@@ -689,6 +689,9 @@ terminate_reason({internal_error, _, _}) -> internal_error.
terminate_all_streams([], _, []) ->
ok;
+%% This stream was already terminated and is now just flushing the data out. Skip it.
+terminate_all_streams([#stream{state=flush}|Tail], Reason, Children) ->
+ terminate_all_streams(Tail, Reason, Children);
terminate_all_streams([#stream{id=StreamID, state=StreamState}|Tail], Reason, Children0) ->
stream_call_terminate(StreamID, Reason, StreamState),
Children = stream_terminate_children(Children0, StreamID, []),