Yield function call with timeout works, there was an issue with blockant socket.

Dependencies:   C12832 MQTT

Fork of HelloMQTT by MQTT

Revision:
21:eaf9e44036fc
Parent:
20:49c9daf2b0ff
--- a/MQTTNetwork.h	Tue Jan 10 18:10:17 2017 -0600
+++ b/MQTTNetwork.h	Thu May 04 11:36:39 2017 +0000
@@ -14,6 +14,8 @@
     }
 
     int read(unsigned char* buffer, int len, int timeout) {
+        socket->set_blocking(true);
+        socket->set_timeout(timeout);
         return socket->recv(buffer, len);
     }