A small memory footprint AMQP implimentation

Dependents:   iothub_client_sample_amqp remote_monitoring simplesample_amqp

Revision:
44:9dd558f13109
Parent:
43:4c1e4e94cdd3
Child:
46:01f7ca900e07
--- a/link.c	Mon Jun 11 15:39:52 2018 -0700
+++ b/link.c	Tue Jun 26 19:14:57 2018 -0700
@@ -593,6 +593,8 @@
             bool closed = false;
             ERROR_HANDLE error;
 
+            (void)detach_get_closed(detach, &closed);
+
             /* Received a detach while attached */
             if (link_instance->link_state == LINK_STATE_ATTACHED)
             {
@@ -635,8 +637,6 @@
             }
             else 
             {
-                (void)detach_get_closed(detach, &closed);
-
                 remove_all_pending_deliveries(link_instance, true);
                 set_link_state(link_instance, LINK_STATE_DETACHED);
             }