diff options
author | xengineering <me@xengineering.eu> | 2022-08-16 09:50:05 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2022-08-16 09:50:05 +0200 |
commit | 54e1451933dd17c3d5649ad630f2de49fce41086 (patch) | |
tree | 4999fb5f64200e3d0c081cfe77ac1c3eb2650a86 | |
parent | 8fca7d6ea2d7e191d8b4201e3490bfd001813461 (diff) | |
download | limox-54e1451933dd17c3d5649ad630f2de49fce41086.tar limox-54e1451933dd17c3d5649ad630f2de49fce41086.tar.zst limox-54e1451933dd17c3d5649ad630f2de49fce41086.zip |
Update release of connection
Using the return value of xmpp_conn_release() allows to recognize if the memory
of the connection is free.
-rw-r--r-- | limox.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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; } |