aboutsummaryrefslogtreecommitdiffstats
path: root/test/handlers
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2023-12-13 17:24:48 +0100
committerLoïc Hoguin <[email protected]>2023-12-14 15:25:25 +0100
commit67bd791dcc6138758a9f4d0a071f2369301c7373 (patch)
tree6f52d5ab186172f0b91d1e8c27f300071e6c4e93 /test/handlers
parentefb681d74982dd048638b00c3c275091ba1d4a2a (diff)
downloadcowboy-67bd791dcc6138758a9f4d0a071f2369301c7373.tar.gz
cowboy-67bd791dcc6138758a9f4d0a071f2369301c7373.tar.bz2
cowboy-67bd791dcc6138758a9f4d0a071f2369301c7373.zip
Change send_timeout_close test to accomodate macOS
Diffstat (limited to 'test/handlers')
-rw-r--r--test/handlers/loop_handler_endless_h.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/handlers/loop_handler_endless_h.erl b/test/handlers/loop_handler_endless_h.erl
index f18361f..d8c8ab5 100644
--- a/test/handlers/loop_handler_endless_h.erl
+++ b/test/handlers/loop_handler_endless_h.erl
@@ -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}.