mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Fix an intermittent test failure
This commit is contained in:
parent
308045fd67
commit
920adb9b82
1 changed files with 6 additions and 1 deletions
|
@ -511,7 +511,12 @@ request_timeout_skip_body_more(Config) ->
|
||||||
%% Missing final \r\n on purpose.
|
%% Missing final \r\n on purpose.
|
||||||
>>),
|
>>),
|
||||||
%% Connection should be closed by the request_timeout after that.
|
%% Connection should be closed by the request_timeout after that.
|
||||||
{error, closed} = raw_recv(Client, 1, 1000)
|
%% We attempt to send a 408 response on a best effort basis so
|
||||||
|
%% that is accepted as well.
|
||||||
|
case raw_recv(Client, 13, 1000) of
|
||||||
|
{error, closed} -> ok;
|
||||||
|
{ok, <<"HTTP/1.1 408 ", _/bits>>} -> ok
|
||||||
|
end
|
||||||
after
|
after
|
||||||
cowboy:stop_listener(?FUNCTION_NAME)
|
cowboy:stop_listener(?FUNCTION_NAME)
|
||||||
end.
|
end.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue