mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Increase loop_handler_timeout timeouts
It seems that macOS GH runners don't do timeouts well.
This commit is contained in:
parent
a81dc8af9d
commit
1547e9b93e
3 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ init(Req, _) ->
|
|||
{cowboy_loop, Req, undefined}.
|
||||
|
||||
info(message, Req, State) ->
|
||||
erlang:send_after(200, self(), message),
|
||||
erlang:send_after(500, self(), message),
|
||||
{ok, Req, State, 100};
|
||||
info(timeout, Req, State) ->
|
||||
{stop, cowboy_req:reply(<<"299 OK!">>, Req), State}.
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
init(Req, _) ->
|
||||
#{timeout := Timeout} = cowboy_req:match_qs([{timeout, int}], Req),
|
||||
erlang:send_after(200, self(), message),
|
||||
erlang:send_after(500, self(), message),
|
||||
{cowboy_loop, Req, undefined, Timeout}.
|
||||
|
||||
info(message, Req, State) ->
|
||||
|
|
|
@ -103,7 +103,7 @@ timeout_info(Config) ->
|
|||
timeout_init(Config) ->
|
||||
doc("Ensure that loop handler idle timeouts trigger on time when set in init/2."),
|
||||
ConnPid = gun_open(Config),
|
||||
Ref = gun:get(ConnPid, "/loop_timeout_init?timeout=300",
|
||||
Ref = gun:get(ConnPid, "/loop_timeout_init?timeout=1000",
|
||||
[{<<"accept-encoding">>, <<"gzip">>}]),
|
||||
{response, fin, 200, _} = gun:await(ConnPid, Ref),
|
||||
Ref2 = gun:get(ConnPid, "/loop_timeout_init?timeout=100",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue