From 03d306e6d172eb272a564aa8626d4554d1046455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 3 Jul 2020 11:02:59 +0200 Subject: Fix concurrent body streaming getting stuck with HTTP/2 --- test/req_SUITE.erl | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/req_SUITE.erl b/test/req_SUITE.erl index 8216a95..352b2a0 100644 --- a/test/req_SUITE.erl +++ b/test/req_SUITE.erl @@ -1012,6 +1012,16 @@ stream_body_content_length_nofin_error(Config) -> ok end. +stream_body_concurrent(Config) -> + ConnPid = gun_open(Config), + Ref1 = gun:get(ConnPid, "/resp/stream_body/loop", [{<<"accept-encoding">>, <<"gzip">>}]), + Ref2 = gun:get(ConnPid, "/resp/stream_body/loop", [{<<"accept-encoding">>, <<"gzip">>}]), + {response, nofin, 200, _} = gun:await(ConnPid, Ref1, infinity), + {ok, _} = gun:await_body(ConnPid, Ref1, infinity), + {response, nofin, 200, _} = gun:await(ConnPid, Ref2, infinity), + {ok, _} = gun:await_body(ConnPid, Ref2, infinity), + gun:close(ConnPid). + %% @todo Crash when calling stream_body after the fin flag has been set. %% @todo Crash when calling stream_body after calling reply. %% @todo Crash when calling stream_body before calling stream_reply. -- cgit v1.2.3