NuMaker connection with AWS IoT thru MQTT/HTTPS

Dependencies:   MQTT_ON_AWS

Revision:
3:4c8cccd32e34
Parent:
1:5ffad9f24d63
Child:
8:d5ea623ffc1f
--- a/main.cpp	Thu Jan 04 13:22:10 2018 +0800
+++ b/main.cpp	Tue Jan 09 15:46:49 2018 +0800
@@ -274,7 +274,7 @@
             printf("Connecting with %s:%d\n", _domain, _port);
             tls_rc = _tlssocket->connect(_domain, _port);
             if (tls_rc != NSAPI_ERROR_OK) {
-                printf("Connects with %s:%d failed\n", _domain, _port);
+                printf("Connects with %s:%d failed: %d\n", _domain, _port, tls_rc);
                 break;
             }
             printf("Connects with %s:%d OK\n", _domain, _port);
@@ -512,7 +512,7 @@
             printf("Connecting with %s:%d\n", _domain, _port);
             tls_rc = _tlssocket->connect(_domain, _port);
             if (tls_rc != NSAPI_ERROR_OK) {
-                printf("Connects with %s:%d failed\n", _domain, _port);
+                printf("Connects with %s:%d failed: %d\n", _domain, _port, tls_rc);
                 break;
             }
             printf("Connects with %s:%d OK\n\n", _domain, _port);
@@ -735,5 +735,5 @@
     mbed_stats_heap_t heap_stats;
     mbed_stats_heap_get(&heap_stats);
     printf("\nCurrent heap size: %lu\n", heap_stats.current_size);
-    printf("Max heap size: %lu\n", heap_stats.max_size);
+    printf("Max heap size: %lu\n\n", heap_stats.max_size);
 }