mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
added resources release to connetion handler
This commit is contained in:
parent
5542752afb
commit
0f0e04603a
@ -63,6 +63,7 @@ chat_sessions_init(void)
|
||||
void
|
||||
chat_sessions_clear(void)
|
||||
{
|
||||
if (sessions != NULL)
|
||||
g_hash_table_remove_all(sessions);
|
||||
}
|
||||
|
||||
|
@ -527,6 +527,7 @@ jabber_free_resources(void)
|
||||
FREE_SET_NULL(saved_account);
|
||||
FREE_SET_NULL(saved_altdomain);
|
||||
chat_sessions_clear();
|
||||
if (sub_requests != NULL)
|
||||
g_hash_table_remove_all(sub_requests);
|
||||
xmpp_conn_release(jabber_conn.conn);
|
||||
xmpp_ctx_free(jabber_conn.ctx);
|
||||
@ -790,6 +791,9 @@ _connection_handler(xmpp_conn_t * const conn,
|
||||
if (prefs_get_reconnect() != 0) {
|
||||
assert(reconnect_timer == NULL);
|
||||
reconnect_timer = g_timer_new();
|
||||
// TODO: free resources but leave saved_* untouched
|
||||
} else {
|
||||
jabber_free_resources();
|
||||
}
|
||||
|
||||
// login attempt failed
|
||||
@ -801,6 +805,7 @@ _connection_handler(xmpp_conn_t * const conn,
|
||||
if (prefs_get_reconnect() != 0) {
|
||||
g_timer_start(reconnect_timer);
|
||||
}
|
||||
// TODO: free resources but leave saved_* untouched
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user