summaryrefslogtreecommitdiff
path: root/examples/amqp_producer.c
diff options
context:
space:
mode:
authorDavid Wragg <dpw@lshift.net>2010-05-30 23:31:40 +0100
committerDavid Wragg <dpw@lshift.net>2010-05-30 23:31:40 +0100
commit2347dc9977d3bf0c9ed19f7ed3a905eb4e65fa46 (patch)
tree56b6486c279997736c61a5b3fe6661caadb7d352 /examples/amqp_producer.c
parent76e825b388c6c3b65ef238a245748f38d3f1c1fc (diff)
downloadrabbitmq-c-github-ask-2347dc9977d3bf0c9ed19f7ed3a905eb4e65fa46.tar.gz
Add amqp_end_connection, which closes the socket and destroys the connection
Diffstat (limited to 'examples/amqp_producer.c')
-rw-r--r--examples/amqp_producer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/amqp_producer.c b/examples/amqp_producer.c
index ac6eebc..94c529d 100644
--- a/examples/amqp_producer.c
+++ b/examples/amqp_producer.c
@@ -151,7 +151,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;
}