mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Minor simplification of testcase
This commit is contained in:
parent
9ac190e1e3
commit
3511fed270
1 changed files with 2 additions and 5 deletions
|
@ -259,12 +259,9 @@ http2_cancel_flood_helper(Config, NumStreamsPerBatch, NumBatches) ->
|
|||
AllStreamIDs,
|
||||
lists:seq(1, NumBatches, 1)),
|
||||
%% When Cowboy detects a flood it must close the connection.
|
||||
case gen_tcp:recv(Socket, 9, 6000) of
|
||||
{ok, <<_:24, 7:8, 0:8, 0:32>>} ->
|
||||
case gen_tcp:recv(Socket, 17, 6000) of
|
||||
{ok, <<_:24, 7:8, 0:8, 0:32, _LastStreamId:32, 11:32>>} ->
|
||||
%% GOAWAY with error code 11 = enhance your calm
|
||||
{ok, <<_LastStreamId:32, ErrorCode:32>>} =
|
||||
gen_tcp:recv(Socket, 8, 1000),
|
||||
11 = ErrorCode, %% ENHANCE_YOUR_CALM
|
||||
ok;
|
||||
%% We also accept the connection being closed immediately,
|
||||
%% which may happen because we send the GOAWAY right before closing.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue