Extend autoping timer on each stanza we receive.

Sometimes the server is too busy sending other stanzas or our connection is
saturated because of something else, so the pong arrives too late.
Prevent the autoping disconnect event by extending the timeout
each time a stanza is received.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2023-05-22 16:58:57 +02:00
parent 0de0594c5a
commit e668c4f7df
4 changed files with 12 additions and 2 deletions

View File

@@ -153,6 +153,7 @@ static int
_message_handler(xmpp_conn_t* const conn, xmpp_stanza_t* const stanza, void* const userdata)
{
log_debug("Message stanza handler fired");
autoping_timer_extend();
if (_handled_by_plugin(stanza)) {
return 1;