ap

Dependencies:   DnsQuery

Dependents:   WizFi310_TCP_Echo_Server_Example

Fork of NetworkSocketAPI by NetworkSocketAPI

Revision:
115:950b19eb0f02
Parent:
105:2fd212f8da61
Child:
116:bc043343d753
--- a/TCPServer.cpp	Wed Apr 20 11:07:19 2016 -0500
+++ b/TCPServer.cpp	Wed Apr 20 19:05:03 2016 -0500
@@ -60,8 +60,9 @@
             connection->_socket = socket;
         }
 
-        if (err != NSAPI_ERROR_WOULD_BLOCK || !_blocking || 
-            (_timeout && timer.read_ms() > _timeout)) {
+        if (err != NSAPI_ERROR_WOULD_BLOCK
+            || _timeout < 0
+            || timer.read_ms() > _timeout) {
             return err;
         }
     }