-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Channel timeout related issue #2958
Comments
Currently, only pong responses reset the timeout timer, so setting |
My understanding with regard to pong responses is that if the client side sends a ping and we send a pong then the channel will remain open even if we set the alive_pings as false? |
The internal inactivity timer is updated whenever the stream receives a message or a pong in response to a previously sent ping. |
Hi @ashtum , could you please confirm when the ping response feature, which is planned to be added in the Boost 1.88 release, will be available? |
Boost 1.88 will be released in April: https://www.boost.io/calendar/ |
Boost Version: 354
When opening two WebSocket channels, for example,
ws:/../channel1/
andws:/../channel2/
, I have made changes to enable communication between the two channels.I have set the timeout to 30 seconds using the following code:
However, the issue is that say both channels are opened at the same time. If, after 15 seconds, communication occurs between the two channels (e.g., from
channel1
tochannel2
), the timeout forchannel1
will restart and close the connection after 45 seconds(15+30 =45;from beginning). But forchannel2
, even though it is receiving messages, its timeout does not reset and will close exactly after 30 seconds, which I don't want.One possible solution is to keep the
alive_pings
set totrue
so the channel remains open, but I prefer not to use this approach, as it could increase the server load.Could you suggest another solution to handle this?
Additionally, I have another question: If we implement a ping-pong mechanism, where the server receives a ping and responds with a pong to the client, would this reset the timeout? And how can I test this?
The text was updated successfully, but these errors were encountered: