From c10c930e8f670c50c45c85b1039c474a7bebbdb5 Mon Sep 17 00:00:00 2001 From: Nikolay Lineckiy Date: Tue, 4 Dec 2018 18:58:36 +0300 Subject: [PATCH] Fix incomplete send queue cleanup Due to incomplete reset xmpp_conn_t object could not be safely reused for reconnection --- src/conn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/conn.c b/src/conn.c index 8c571ad..91cd9ab 100644 --- a/src/conn.c +++ b/src/conn.c @@ -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);