Fix incomplete send queue cleanup

Due to incomplete reset xmpp_conn_t object could not be safely reused
for reconnection
This commit is contained in:
Nikolay Lineckiy
2018-12-04 18:58:36 +03:00
parent 6ddf424192
commit c10c930e8f

View File

@@ -1210,6 +1210,9 @@ static void _conn_reset(xmpp_conn_t * const conn)
xmpp_free(ctx, tsq->data);
xmpp_free(ctx, tsq);
}
conn->send_queue_head = NULL;
conn->send_queue_tail = NULL;
conn->send_queue_len = 0;
if (conn->stream_error) {
xmpp_stanza_release(conn->stream_error->stanza);