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;