From c1f9122ab2a646df9182e51e3181de6ffa71af0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20S=C3=B6derqvist?= Date: Thu, 12 May 2022 23:37:49 +0200 Subject: Add keepalive_tolerance http2 option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The number of unacknowledged pings that can be tolerated before the connection is forcefully closed. When a keepalive ping is sent to the peer, a counter is incremented and if this counter exceeds the tolerance limit, the connection is forcefully closed. The counter is decremented whenever a ping ack is received from the peer. By default, the mechanism for closing the connection based on ping and ping ack is disabled. Loïc Hoguin: I have edited a lot of the code and renamed a few things as well as simplified the docs and increased test timeouts to avoid race conditions. --- doc/src/manual/gun.asciidoc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/src/manual/gun.asciidoc b/doc/src/manual/gun.asciidoc index 40559fb..d511fdc 100644 --- a/doc/src/manual/gun.asciidoc +++ b/doc/src/manual/gun.asciidoc @@ -209,6 +209,7 @@ http2_opts() :: #{ cookie_ignore_informational => boolean(), flow => pos_integer(), keepalive => timeout(), + keepalive_tolerance => non_neg_integer(), %% HTTP/2 state machine configuration. connection_window_margin_size => 0..16#7fffffff, @@ -257,6 +258,13 @@ keepalive (infinity):: Time between pings in milliseconds. +keepalive_tolerance - see below:: + +The number of unacknowledged pings in flight that are +tolerated before the connection is closed. By default +this mechanism is disabled even if `keepalive` is +enabled. + === opts() [source,erlang] -- cgit v1.2.3