summaryrefslogtreecommitdiff
path: root/limox.c
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2022-08-16 09:50:05 +0200
committerxengineering <me@xengineering.eu>2022-08-16 09:50:05 +0200
commit54e1451933dd17c3d5649ad630f2de49fce41086 (patch)
tree4999fb5f64200e3d0c081cfe77ac1c3eb2650a86 /limox.c
parent8fca7d6ea2d7e191d8b4201e3490bfd001813461 (diff)
downloadlimox-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.
Diffstat (limited to 'limox.c')
-rw-r--r--limox.c8
1 files changed, 3 insertions, 5 deletions
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;
}