From 8c5019d3bcdb5ade118217d081e9d071b4ff9232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 20 Sep 2019 12:40:05 +0200 Subject: Improve retrieval of keepalive option --- src/gun_http.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gun_http.erl') 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. -- cgit v1.2.3