summaryrefslogtreecommitdiff
path: root/examples/amqp_exchange_declare.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/amqp_exchange_declare.c')
-rw-r--r--examples/amqp_exchange_declare.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/amqp_exchange_declare.c b/examples/amqp_exchange_declare.c
index 14bc163..e77ac52 100644
--- a/examples/amqp_exchange_declare.c
+++ b/examples/amqp_exchange_declare.c
@@ -89,12 +89,11 @@ int main(int argc, char const * const *argv) {
die_on_amqp_error(amqp_get_rpc_reply(conn), "Opening channel");
amqp_exchange_declare(conn, 1, amqp_cstring_bytes(exchange), amqp_cstring_bytes(exchangetype),
- 0, 0, 0, AMQP_EMPTY_TABLE);
+ 0, 0, AMQP_EMPTY_TABLE);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Declaring exchange");
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_destroy_connection(conn), "Ending connection");
return 0;
}