From b7a4368c3f9368f6d824bbbeee5d0703c16f6813 Mon Sep 17 00:00:00 2001 From: Morten Minde Neergaard <169057+xim@users.noreply.github.com> Date: Mon, 2 Oct 2023 09:04:34 +0200 Subject: [PATCH] Update documentation to match changes in PR #2718 --- doc/qbk/06_websocket/06_timeouts.qbk | 4 ++-- include/boost/beast/websocket/stream_base.hpp | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/qbk/06_websocket/06_timeouts.qbk b/doc/qbk/06_websocket/06_timeouts.qbk index cc27dbc61d..e39a5df36b 100644 --- a/doc/qbk/06_websocket/06_timeouts.qbk +++ b/doc/qbk/06_websocket/06_timeouts.qbk @@ -59,8 +59,8 @@ There are three timeout settings which may be set independently on the stream: [[link beast.ref.boost__beast__websocket__stream_base__timeout.idle_timeout `timeout::idle_timeout`]] [`duration`] [ - If no data is received from the peer for a time equal to the idle - timeout, then the connection will time out. + If no data or control frames are received from the peer for a time + equal to the idle timeout, then the connection will time out. The value returned by [link beast.ref.boost__beast__websocket__stream_base.none `stream_base::none()`] may be assigned to disable this timeout. diff --git a/include/boost/beast/websocket/stream_base.hpp b/include/boost/beast/websocket/stream_base.hpp index 0968e80e49..2b7f88ff53 100644 --- a/include/boost/beast/websocket/stream_base.hpp +++ b/include/boost/beast/websocket/stream_base.hpp @@ -116,8 +116,10 @@ struct stream_base An outstanding read operation must be pending, which will complete immediately the error @ref beast::error::timeout. - @li When `keep_alive_pings` is `false`, the connection will be closed. - An outstanding read operation must be pending, which will + @li When `keep_alive_pings` is `false`, the connection will + be closed if there has been no activity. Both websocket + message frames and control frames count as activity. An + outstanding read operation must be pending, which will complete immediately the error @ref beast::error::timeout. */ bool keep_alive_pings;