From 2347dc9977d3bf0c9ed19f7ed3a905eb4e65fa46 Mon Sep 17 00:00:00 2001 From: David Wragg Date: Sun, 30 May 2010 23:31:40 +0100 Subject: Add amqp_end_connection, which closes the socket and destroys the connection --- examples/amqp_sendstring.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'examples/amqp_sendstring.c') diff --git a/examples/amqp_sendstring.c b/examples/amqp_sendstring.c index 6e8e0b6..e669505 100644 --- a/examples/amqp_sendstring.c +++ b/examples/amqp_sendstring.c @@ -108,7 +108,6 @@ int main(int argc, char const * const *argv) { die_on_amqp_error(amqp_channel_close(conn, 1, AMQP_REPLY_SUCCESS), "Closing channel"); die_on_amqp_error(amqp_connection_close(conn, AMQP_REPLY_SUCCESS), "Closing connection"); - amqp_destroy_connection(conn); - die_on_error(close(sockfd), "Closing socket"); + die_on_error(amqp_end_connection(conn), "Ending connection"); return 0; } -- cgit v1.2.1 From 7290a2692cd0f597573de51599c9b50088c02f90 Mon Sep 17 00:00:00 2001 From: David Wragg Date: Mon, 26 Jul 2010 03:09:38 +0100 Subject: Fold amqp_end_connection socket closing into amqp_destroy_connection --- examples/amqp_sendstring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/amqp_sendstring.c') diff --git a/examples/amqp_sendstring.c b/examples/amqp_sendstring.c index e669505..ccd3866 100644 --- a/examples/amqp_sendstring.c +++ b/examples/amqp_sendstring.c @@ -108,6 +108,6 @@ int main(int argc, char const * const *argv) { die_on_amqp_error(amqp_channel_close(conn, 1, AMQP_REPLY_SUCCESS), "Closing channel"); die_on_amqp_error(amqp_connection_close(conn, AMQP_REPLY_SUCCESS), "Closing connection"); - die_on_error(amqp_end_connection(conn), "Ending connection"); + die_on_error(amqp_destroy_connection(conn), "Ending connection"); return 0; } -- cgit v1.2.1