From fa63aac731aee2594712f29541e58be1b3badbf0 Mon Sep 17 00:00:00 2001 From: Dmitry Podgorny Date: Fri, 23 Jun 2017 21:51:44 +0300 Subject: [PATCH] auth: delete error handler before re-opening stream --- src/auth.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/auth.c b/src/auth.c index 5ad65ae..4a9fd79 100644 --- a/src/auth.c +++ b/src/auth.c @@ -288,6 +288,8 @@ static int _handle_proceedtls_default(xmpp_conn_t * const conn, xmpp_debug(conn->ctx, "xmpp", "proceeding with TLS"); if (conn_tls_start(conn) == 0) { + /* we are about to re-open stream, add new error handler after */ + xmpp_handler_delete(conn, _handle_error); conn_prepare_reset(conn, auth_handle_open); conn_open_stream(conn); } else {