From 7db5b178f6b50d372eed18cc285a93fc4dc1a663 Mon Sep 17 00:00:00 2001 From: William King Date: Mon, 8 Jun 2015 20:28:38 -0700 Subject: [PATCH] FS-7622 make sure to close the connections on destroy. Currently the connection is malloc'd from the module pool, so there is nothing to destroy. --- src/mod/event_handlers/mod_amqp/mod_amqp_connection.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mod/event_handlers/mod_amqp/mod_amqp_connection.c b/src/mod/event_handlers/mod_amqp/mod_amqp_connection.c index 7aa3095765..8e8be16389 100644 --- a/src/mod/event_handlers/mod_amqp/mod_amqp_connection.c +++ b/src/mod/event_handlers/mod_amqp/mod_amqp_connection.c @@ -234,6 +234,7 @@ switch_status_t mod_amqp_connection_create(mod_amqp_connection_t **conn, switch_ void mod_amqp_connection_destroy(mod_amqp_connection_t **conn) { if (conn && *conn) { + mod_amqp_connection_close(*conn); *conn = NULL; } }