summaryrefslogtreecommitdiff
path: root/examples/amqp_sendstring.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/amqp_sendstring.c')
-rw-r--r--examples/amqp_sendstring.c3
1 files changed, 1 insertions, 2 deletions
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;
}