diff options
author | Loïc Hoguin <[email protected]> | 2017-08-14 14:57:59 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-08-14 14:57:59 +0200 |
commit | 0fe54af72b81fdb198a377198d7f3a91f9ad6d7c (patch) | |
tree | d7b7d5e014f0b2311fd3301e609bca20c15d278f /test/gun_SUITE.erl | |
parent | 6dc280be003c5bb648f4ea26f7a7670c62295c3f (diff) | |
download | gun-0fe54af72b81fdb198a377198d7f3a91f9ad6d7c.tar.gz gun-0fe54af72b81fdb198a377198d7f3a91f9ad6d7c.tar.bz2 gun-0fe54af72b81fdb198a377198d7f3a91f9ad6d7c.zip |
Allow an infinity keepalive value1.0.0-pre.4
This disables the keepalive mechanism entirely.
Diffstat (limited to 'test/gun_SUITE.erl')
-rw-r--r-- | test/gun_SUITE.erl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/gun_SUITE.erl b/test/gun_SUITE.erl index 842d40c..a7e2169 100644 --- a/test/gun_SUITE.erl +++ b/test/gun_SUITE.erl @@ -110,6 +110,20 @@ info(_) -> #{sock_ip := _, sock_port := _} = gun:info(Pid), ok. +keepalive_infinity(_) -> + doc("Ensure infinity for keepalive is accepted by all protocols."), + {ok, Pid} = gun:open("localhost", 12345, #{ + http_opts => #{keepalive => infinity}, + http2_opts => #{keepalive => infinity}, + retry => 0}), + Ref = monitor(process, Pid), + receive + {'DOWN', Ref, process, Pid, {{gone, _}, _}} -> + ok + after 5000 -> + error(timeout) + end. + reply_to(_) -> doc("The reply_to option allows using a separate process for requests."), do_reply_to(http), |