about summary refs log tree commit diff stats
path: root/src/event/common.c
diff options
context:
space:
mode:
authorDmitry Podgorny <pasis.ua@gmail.com>2019-06-03 13:04:04 +0300
committerDmitry Podgorny <pasis.ua@gmail.com>2019-06-03 13:28:00 +0300
commit6138a5f79be3e5f1c36f94accf7b836ca23a1bc6 (patch)
tree3c10d9e1ac9206b452417b4287ef69142a9eee2e /src/event/common.c
parent5b4277840a9822945ccdb552a0a56cc3a62c49f3 (diff)
downloadprofani-tty-6138a5f79be3e5f1c36f94accf7b836ca23a1bc6.tar.gz
Cancel autoping timer on disconnect or connection loss
If Profanity is disconnected in any way before ping response is
received, the autoping timer will expire after the next connection
is established. As result, user will be disconnected immediately.

Cancel autoping timer in ev_disconnect_cleanup(), so it is done
for all kind of disconnections.
Diffstat (limited to 'src/event/common.c')
-rw-r--r--src/event/common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/event/common.c b/src/event/common.c
index 062e680b..dd5ede98 100644
--- a/src/event/common.c
+++ b/src/event/common.c
@@ -53,6 +53,7 @@ ev_disconnect_cleanup(void)
     ui_disconnected();
     session_disconnect();
     roster_destroy();
+    iq_autoping_timer_cancel();
     muc_invites_clear();
     muc_confserver_clear();
     chat_sessions_clear();