about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-02-25 00:14:06 +0000
committerJames Booth <boothj5@gmail.com>2016-02-25 00:14:06 +0000
commit661cda3b10b8de7745cae12e06b6de20eb7b19d9 (patch)
tree710c6a25e79d31ef45b0ef7d601d34d536852f6c
parentf18fbe333ad8363ca5dffd5547386059c024616d (diff)
parent51c6cefafd5ad2f36a98c052059ed64e2a966d0e (diff)
downloadprofani-tty-661cda3b10b8de7745cae12e06b6de20eb7b19d9.tar.gz
Merge branch 'master' into plugins-python
-rw-r--r--src/xmpp/connection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c
index ded42a6d..35fd9938 100644
--- a/src/xmpp/connection.c
+++ b/src/xmpp/connection.c
@@ -207,6 +207,9 @@ jabber_autoping_fail(void)
 {
     if (jabber_conn.conn_status == JABBER_CONNECTED) {
         log_info("Closing connection");
+        char *account_name = jabber_get_account_name();
+        const char *fulljid = jabber_get_fulljid();
+        plugins_on_disconnect(account_name, fulljid);
         accounts_set_last_activity(jabber_get_account_name());
         jabber_conn.conn_status = JABBER_DISCONNECTING;
         xmpp_disconnect(jabber_conn.conn);
@@ -584,9 +587,6 @@ _jabber_reconnect(void)
 static void
 _jabber_lost_connection(void)
 {
-    char *account_name = jabber_get_account_name();
-    const char *fulljid = jabber_get_fulljid();
-    plugins_on_disconnect(account_name, fulljid);
     sv_ev_lost_connection();
     if (prefs_get_reconnect() != 0) {
         assert(reconnect_timer == NULL);