about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
authorDebXWoody <stefan@debxwoody.de>2020-05-23 06:40:49 +0200
committerDebXWoody <stefan@debxwoody.de>2020-05-23 06:52:03 +0200
commit3cd3bced7086fbad511ece9e5c58d52fc49455e9 (patch)
tree8dfd820d73dfbdb45645cf8a528b2ddcbab0b748 /src/xmpp
parent86f0e0ea7033a27a83a5c24091ae1fd5b579296d (diff)
downloadprofani-tty-3cd3bced7086fbad511ece9e5c58d52fc49455e9.tar.gz
Incoming iq stanza - Reset the autoping timer
A autoping is to make sure that there is still a connection between server and
client. If the application receives incoming stanza, the connection is fine.
There is no need to wait for response, if there are other incomings.

Issue: #1333 and #1315
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/iq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c
index 8c373f77..75bd73a1 100644
--- a/src/xmpp/iq.c
+++ b/src/xmpp/iq.c
@@ -159,6 +159,8 @@ _iq_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const us
 {
     log_debug("iq stanza handler fired");
 
+    iq_autoping_timer_cancel(); // reset the autoping timer
+
     char *text;
     size_t text_size;
     xmpp_stanza_to_text(stanza, &text, &text_size);