Repository navigation
MIM-2766 Fix mod ping intervals - #4761
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`.
Send pings with correct interval in `mod_ping`
|
CircleCI results for 52f8073 small_tests_legacy / small_tests / ee2b2ba small_tests_latest / small_tests / ee2b2ba small_tests_latest_arm64 / small_tests / ee2b2ba ldap_mnesia_latest / ldap_mnesia / ee2b2ba internal_mnesia_latest / internal_mnesia / ee2b2ba dynamic_domains_pgsql_cets_legacy / pgsql_cets / ee2b2ba dynamic_domains_pgsql_cets_latest / pgsql_cets / ee2b2ba elasticsearch_and_cassandra_mnesia_latest / elasticsearch_and_cassandra_mnesia / ee2b2ba mongoose_elasticsearch_SUITE:end_per_suite{error,
{{badrpc,
{'EXIT',
{#{what => event_already_registered,
event_name => wpool_global_queue_lengths,
labels => #{pool_type => elastic,pool_tag => default}},
[{mongoose_instrument,set_up,3,
[{file,
"/home/circleci/project/src/instrument/mongoose_instrument.erl"},
{line,114}]},
{lists,foreach_1,2,[{file,"lists.erl"},{line,2641}]},
{mongoose_wpool,start,5,
[{file,
"/home/circleci/project/src/wpool/mongoose_wpool.erl"},
{line,162}]},
{mongoose_wpool,'-start_configured_pools/3-lc$^1/1-1-',1,
[{file,
"/home/circleci/project/src/wpool/mongoose_wpool.erl"},
{line,129}]},
{mongoose_wpool,start_configured_pools,1,[]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim@localhost},
mongoose_wpool,start_configured_pools,
[[#{scope => global,tag => default,type => elastic,
opts =>
#{strategy => best_worker,workers => 10,
call_timeout => 5000},
conn_opts => #{port => 9200,host => <<"localhost">>}}]]],
[{file,
"/home/circleci/project/big_tests/../test/common/distributed_helper.erl"},
{line,143}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1799}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1396}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1240}]}]}...pgsql_cets_legacy / pgsql_cets / ee2b2ba pgsql_cets_latest / pgsql_cets / ee2b2ba pgsql_mnesia_latest / pgsql_mnesia / ee2b2ba pgsql_redis_latest / pgsql_redis / ee2b2ba mysql_cets_latest / mysql_cets / ee2b2ba cockroachdb_cets_latest / cockroachdb_cets / ee2b2ba |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4761 +/- ##
==========================================
- Coverage 86.98% 86.95% -0.03%
==========================================
Files 554 554
Lines 33597 33593 -4
==========================================
- Hits 29223 29212 -11
- Misses 4374 4381 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This test was checking the support for legacy "whitespace ping", but it was only passing because of a bug (double timeout). The support for whitespace ping has been long gone.
Fix
mod_pingso server-to-client pings are sent after the configuredping_intervalwithping_req_timeoutused only for waiting for the client response.active_keep_alivetest, since whitespace keepalive no longer resets the ping timer and is not part of XEP-0199 behavior. This test was passing only because of the bug. The tested functionality has been long gone from MIM (sincemongoose_c2s).mod_pingin docs.