mirror of
https://github.com/boostorg/beast.git
synced 2025-08-05 15:54:46 +02:00
Fix websocket keep-alive ping expiration
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
Version 244:
|
Version 244:
|
||||||
|
|
||||||
* Tidy up declval in some traits
|
* Tidy up declval in some traits
|
||||||
|
* Fix websocket keep-alive ping expiration
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -424,6 +424,10 @@ struct stream<NextLayer, deflateSupported>::impl_type
|
|||||||
if(timeout_opt.idle_timeout != none())
|
if(timeout_opt.idle_timeout != none())
|
||||||
{
|
{
|
||||||
idle_counter = 0;
|
idle_counter = 0;
|
||||||
|
if(timeout_opt.keep_alive_pings)
|
||||||
|
timer.expires_after(
|
||||||
|
timeout_opt.idle_timeout / 2);
|
||||||
|
else
|
||||||
timer.expires_after(
|
timer.expires_after(
|
||||||
timeout_opt.idle_timeout);
|
timeout_opt.idle_timeout);
|
||||||
timer.async_wait(
|
timer.async_wait(
|
||||||
|
Reference in New Issue
Block a user