Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: util/SmartRestSocket.cpp
- Revision:
- 105:c61f0d62b625
- Parent:
- 98:e369fc75c000
- Child:
- 106:fc5f25f0e0d5
--- a/util/SmartRestSocket.cpp Fri May 08 14:50:43 2015 +0000 +++ b/util/SmartRestSocket.cpp Mon May 11 18:10:44 2015 +0000 @@ -2,7 +2,6 @@ #include "SmartRestSocket.h" #include "SmartRestConf.h" -//memset((void*)SmartRestSocket::cachedIP, 0, sizeof(SmartRestSocket::cachedIP)); char SmartRestSocket::cachedIP[16] = {0}; int SmartRestSocket::connect() @@ -20,6 +19,10 @@ } n = TCPSocketConnection::connect(cachedIP, srPort); if (n >= 0) { + if (timeout == -1) + Socket::set_blocking(true); + else + Socket::set_blocking(false, timeout); break; } else { cachedIP[0] = '\0';