mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Change send_timeout_close test to accomodate macOS
This commit is contained in:
parent
efb681d749
commit
67bd791dcc
3 changed files with 28 additions and 21 deletions
|
@ -19,6 +19,7 @@ init(Req0, #{delay := Delay} = Opts) ->
|
|||
{cowboy_loop, Req, Opts}.
|
||||
|
||||
info(timeout, Req, State) ->
|
||||
cowboy_req:stream_body(<<0:1000/unit:8>>, nofin, Req),
|
||||
erlang:send_after(10, self(), timeout),
|
||||
cowboy_req:stream_body(<<0:10000/unit:8>>, nofin, Req),
|
||||
%% Equivalent to a 0 timeout.
|
||||
self() ! timeout,
|
||||
{ok, Req, State}.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue