Send pings with correct interval in mod_ping#4672
Open
niecore wants to merge 1 commit into
Open
Conversation
The current implementation does not match the documentation. Following configuration options are available `ping_interval` and `ping_req_timout`. The expectation would be that a server to client ping is send after `ping_interval` seconds after the last user activity and then the user has `ping_req_timeout` seconds to answer the ping. But the ping is only sent after `ping_interval` + `ping_req_timeout` This change removes the additional timer for `ping_req_timeout`.
61c8a8a to
99baca8
Compare
niecore
commented
Mar 11, 2026
|
|
||
| wait_for_ping_req(Alice) -> | ||
| PingReq = escalus_client:wait_for_stanza(Alice, timer:seconds(10)), | ||
| PingReq = escalus_client:wait_for_stanza(Alice, ping_interval() + timer:seconds(1)), |
Contributor
Author
There was a problem hiding this comment.
This test change makes the issue visible in the test results. I am not sure how stable that timing would be in CI but locally the tests were stable. If there are timing flakiness concerns, let me know and I can look for other solutions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current implementation does not match the documentation. Following configuration options are available:
ping_intervalandping_req_timout. The expectation would be that a server to client ping is send afterping_intervalseconds after the last user activity and then the user hasping_req_timeoutseconds to answer the ping before ping action is executed. But the ping is only sent afterping_interval+ping_req_timeoutThis change removes the additional timer forping_req_timeout.