From 54e1451933dd17c3d5649ad630f2de49fce41086 Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 16 Aug 2022 09:50:05 +0200 Subject: Update release of connection Using the return value of xmpp_conn_release() allows to recognize if the memory of the connection is free. --- limox.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'limox.c') diff --git a/limox.c b/limox.c index b0e74dd..911568b 100644 --- a/limox.c +++ b/limox.c @@ -151,14 +151,12 @@ void limox_disconnect(void) { while (xmpp_conn_is_connected(conn)) { xmpp_run_once(ctx, 200); } - xmpp_conn_release(conn); + if (!xmpp_conn_release(conn)) { + printf("DEBUG: Could not free connection!\n"); + } } - // TODO free conn - conn = NULL; - flags = 0; - state = DISCONNECTED; } -- cgit v1.2.3-70-g09d2