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.
This commit is contained in:
Dmitry Podgorny
2019-06-03 13:04:04 +03:00
parent 5b4277840a
commit 6138a5f79b
4 changed files with 15 additions and 8 deletions

View File

@@ -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();