summaryrefslogtreecommitdiff
path: root/examples/amqp_bind.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/amqp_bind.c')
-rw-r--r--examples/amqp_bind.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/amqp_bind.c b/examples/amqp_bind.c
index 697df2a..cf7c377 100644
--- a/examples/amqp_bind.c
+++ b/examples/amqp_bind.c
@@ -99,7 +99,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;
}