A small memory footprint AMQP implimentation

Dependents:   iothub_client_sample_amqp remote_monitoring simplesample_amqp

Revision:
12:b30dacf113f2
Parent:
9:c22db038556c
Child:
13:9abd748f4e78
--- a/message_sender.c	Thu Sep 22 18:16:30 2016 -0700
+++ b/message_sender.c	Thu Oct 20 17:07:44 2016 -0700
@@ -612,14 +612,13 @@
             (message_sender_instance->message_sender_state == MESSAGE_SENDER_STATE_OPEN))
         {
             set_message_sender_state(message_sender_instance, MESSAGE_SENDER_STATE_CLOSING);
-            if (link_detach(message_sender_instance->link) != 0)
+            if (link_detach(message_sender_instance->link, true) != 0)
             {
                 result = __LINE__;
                 set_message_sender_state(message_sender_instance, MESSAGE_SENDER_STATE_ERROR);
             }
             else
             {
-                set_message_sender_state(message_sender_instance, MESSAGE_SENDER_STATE_IDLE);
                 result = 0;
             }
         }