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 !
}
#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);