Skip to content

Send pings with correct interval in mod_ping#4672

Open
niecore wants to merge 1 commit into
esl:masterfrom
niecore:fix-mod-ping-intervals
Open

Send pings with correct interval in mod_ping#4672
niecore wants to merge 1 commit into
esl:masterfrom
niecore:fix-mod-ping-intervals

Conversation

@niecore

@niecore niecore commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

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 before ping action is executed. But the ping is only sent after ping_interval + ping_req_timeout This change removes the additional timer for ping_req_timeout.

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`.
@niecore niecore force-pushed the fix-mod-ping-intervals branch from 61c8a8a to 99baca8 Compare March 11, 2026 11:05

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)),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@chrzaszcz chrzaszcz self-assigned this Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants