summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3496d68)
raw | patch | inline | side by side (parent: 3496d68)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 21 Jan 2014 09:24:53 +0000 (10:24 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 21 Jan 2014 09:24:53 +0000 (10:24 +0100) |
amqp_socket_close() which we were using isn't exported anymore.
See https://github.com/alanxz/rabbitmq-c/commit/bdda7ab
amqp_destroy_connection() implicitly closes the socket, so we don't need
to bother about this if using librabbitmq >= 0.4.0
credits to @tokkee for figuring that out !
See https://github.com/alanxz/rabbitmq-c/commit/bdda7ab
amqp_destroy_connection() implicitly closes the socket, so we don't need
to bother about this if using librabbitmq >= 0.4.0
credits to @tokkee for figuring that out !
src/amqp.c | patch | blob | history |
diff --git a/src/amqp.c b/src/amqp.c
index 7de9d7f2a5b861e3e39ef59457dcae33fc4b9514..e5a2d79eb61d07d50367a696f6b5dc1595e5b302 100644 (file)
--- a/src/amqp.c
+++ b/src/amqp.c
}
#ifdef HAVE_AMQP_TCP_SOCKET
-# define CLOSE_SOCKET() amqp_socket_close (socket)
+# define CLOSE_SOCKET() // amqp_destroy_connection() closes the socket for us
/* TODO: add support for SSL using amqp_ssl_socket_new
* and related functions */
socket = amqp_tcp_socket_new (conf->connection);
status *= -1;
ERROR ("amqp plugin: amqp_socket_open failed: %s",
sstrerror (status, errbuf, sizeof (errbuf)));
- CLOSE_SOCKET ();
amqp_destroy_connection (conf->connection);
conf->connection = NULL;
return (status);