about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
authorSteffen Jaeckel <jaeckel-floss@eyet-services.de>2023-01-26 11:49:29 +0100
committerSteffen Jaeckel <jaeckel-floss@eyet-services.de>2023-01-26 11:49:29 +0100
commitf406384c3412d15637a26a6a64ef5d3b8375f40c (patch)
treed0b971f4027db09062a671ae45abcb3b6e7f8a2d /src/xmpp
parent494512c25cabc2271b4132f19ad38fb8edee1afa (diff)
downloadprofani-tty-f406384c3412d15637a26a6a64ef5d3b8375f40c.tar.gz
fix libstrophe timer-callback usage
The timer will be auto-removed if the callback returns `0`. The way it was
done before breaks some internals of libstrophe.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/iq.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c
index 89511176..592b6a86 100644
--- a/src/xmpp/iq.c
+++ b/src/xmpp/iq.c
@@ -1396,9 +1396,7 @@ _autoping_timed_send(xmpp_conn_t* const conn, void* const userdata)
         log_warning("Server doesn't advertise %s feature, disabling autoping.", XMPP_FEATURE_PING);
         prefs_set_autoping(0);
         cons_show_error("Server ping not supported (%s), autoping disabled.", XMPP_FEATURE_PING);
-        xmpp_conn_t* conn = connection_get_conn();
-        xmpp_timed_handler_delete(conn, _autoping_timed_send);
-        return 1;
+        return 0;
     }
 
     if (autoping_wait) {