aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/manual/gun.asciidoc6
-rw-r--r--src/gun_http2.erl2
-rw-r--r--src/gun_ws.erl2
3 files changed, 5 insertions, 5 deletions
diff --git a/doc/src/manual/gun.asciidoc b/doc/src/manual/gun.asciidoc
index a2d51f6..8cf46cc 100644
--- a/doc/src/manual/gun.asciidoc
+++ b/doc/src/manual/gun.asciidoc
@@ -241,7 +241,7 @@ flow - see below::
The initial flow control value for all HTTP/2 streams.
By default flow control is disabled.
-keepalive (5000)::
+keepalive (infinity)::
Time between pings in milliseconds.
@@ -514,7 +514,7 @@ flow - see below::
The initial flow control value for the Websocket connection.
By default flow control is disabled.
-keepalive (5000)::
+keepalive (infinity)::
Time between pings in milliseconds.
@@ -559,7 +559,7 @@ when receiving a ping.
lowercased as well.
* *2.0*: Function `gun:headers/4,5` introduced.
* *2.0*: The `keepalive` option is now set to `infinity` by
- default for the HTTP/1.1 protocol, disabling it.
+ default for all protocols. This means it is disabled.
* *2.0*: Websocket options `keepalive` and `silence_pings` introduced.
* *1.3*: Add the CONNECT destination's `protocols` option and
deprecate the previously introduced `protocol` option.
diff --git a/src/gun_http2.erl b/src/gun_http2.erl
index 7677076..e2aeb4a 100644
--- a/src/gun_http2.erl
+++ b/src/gun_http2.erl
@@ -164,7 +164,7 @@ do_check_options([Opt={Name, _}|Opts]) ->
name() -> http2.
opts_name() -> http2_opts.
has_keepalive() -> true.
-default_keepalive() -> 5000.
+default_keepalive() -> infinity.
init(_ReplyTo, Socket, Transport, Opts0) ->
%% We have different defaults than the protocol in order
diff --git a/src/gun_ws.erl b/src/gun_ws.erl
index 8be93e8..f59c19c 100644
--- a/src/gun_ws.erl
+++ b/src/gun_ws.erl
@@ -91,7 +91,7 @@ do_check_options([Opt|_]) ->
name() -> ws.
opts_name() -> ws_opts.
has_keepalive() -> true.
-default_keepalive() -> 5000.
+default_keepalive() -> infinity.
init(ReplyTo, Socket, Transport, #{stream_ref := StreamRef, headers := Headers,
extensions := Extensions, flow := InitialFlow, handler := Handler, opts := Opts}) ->