Yield function call with timeout works, there was an issue with blockant socket.
Fork of HelloMQTT by
Diff: MQTTNetwork.h
- Revision:
- 21:eaf9e44036fc
- Parent:
- 20:49c9daf2b0ff
diff -r 49c9daf2b0ff -r eaf9e44036fc MQTTNetwork.h --- 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); }