From 8b6b528b246ff6009430cdd592886a6299968d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 26 Jul 2019 10:02:30 +0200 Subject: Don't return lingering_data when the length is 0 --- src/cow_http2_machine.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cow_http2_machine.erl b/src/cow_http2_machine.erl index 76fe957..10c79e3 100644 --- a/src/cow_http2_machine.erl +++ b/src/cow_http2_machine.erl @@ -349,9 +349,11 @@ data_frame(Frame={data, StreamID, _, Data}, State0=#http2_machine{ undefined -> %% After we send an RST_STREAM frame and terminate a stream, %% the remote endpoint still might be sending us some more frames - %% until it can process this RST_STREAM. We therefore ignore - %% DATA frames received for such lingering streams. + %% until it can process this RST_STREAM. We cannot use those + %% DATA frames, however we still might want to update the window. case lists:member(StreamID, Lingering) of + true when DataLen =:= 0 -> + {ok, State}; true -> {ok, {lingering_data, StreamID, DataLen}, State}; false -> -- cgit v1.2.3