conn: clear system handlers on reconnect
xmpp_conn_t object can be reused with saving user's handlers. However, saving system handlers can lead to a fail during connection process. This is because old object may contain timed handlers for missed features or other handlers that would handle incoming stanzas incorrectly.
This commit is contained in:
@@ -1215,6 +1215,8 @@ static void _conn_reset(xmpp_conn_t * const conn)
|
||||
conn->secured = 0;
|
||||
conn->tls_failed = 0;
|
||||
conn->error = 0;
|
||||
|
||||
handler_system_delete_all(conn);
|
||||
}
|
||||
|
||||
static int _conn_connect(xmpp_conn_t * const conn,
|
||||
|
||||
Reference in New Issue
Block a user