aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_http.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-09-20 12:40:05 +0200
committerLoïc Hoguin <[email protected]>2019-09-22 16:46:36 +0200
commit8c5019d3bcdb5ade118217d081e9d071b4ff9232 (patch)
treeb6c6b155b46a241963c1328a710c3eb5e468df0d /src/gun_http.erl
parentf75a5416c4979ca26b1fbb8a737def8d01a20c8b (diff)
downloadgun-8c5019d3bcdb5ade118217d081e9d071b4ff9232.tar.gz
gun-8c5019d3bcdb5ade118217d081e9d071b4ff9232.tar.bz2
gun-8c5019d3bcdb5ade118217d081e9d071b4ff9232.zip
Improve retrieval of keepalive option
Diffstat (limited to 'src/gun_http.erl')
-rw-r--r--src/gun_http.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gun_http.erl b/src/gun_http.erl
index ba5c01d..2c26d01 100644
--- a/src/gun_http.erl
+++ b/src/gun_http.erl
@@ -18,6 +18,7 @@
-export([name/0]).
-export([opts_name/0]).
-export([has_keepalive/0]).
+-export([default_keepalive/0]).
-export([init/4]).
-export([switch_transport/3]).
-export([handle/4]).
@@ -100,6 +101,7 @@ do_check_options([Opt|_]) ->
name() -> http.
opts_name() -> http_opts.
has_keepalive() -> true.
+default_keepalive() -> infinity.
init(Owner, Socket, Transport, Opts) ->
%% @todo If we keep the opts we don't need to add these to the state.