for EthernetInterface library compatibility.\\ ** Unoffical fix. may be a problem. **

Dependents:   SNIC-httpclient-example SNIC-ntpclient-example

Fork of SNICInterface by muRata

Revision:
46:e1cb45f7a27f
Parent:
43:d80bbb12ffe6
--- a/Socket/UDPSocket.cpp	Sat Nov 22 11:01:16 2014 +0000
+++ b/Socket/UDPSocket.cpp	Sat Nov 22 15:32:42 2014 +0000
@@ -303,9 +303,17 @@
     con_info_p->mutex.lock();
     con_info_p->is_receive_complete = true;
     con_info_p->mutex.unlock();
-    while( con_info_p->is_received == false )
+    if( con_info_p->is_received == false )
     {
+        // Try receive
         Thread::yield();
+        
+        if( con_info_p->is_received == false )
+        {
+            // No data received.
+            FUNC_OUT();
+            return 0;
+        }
     }
     // Get packet data from buffer for receive.
     int i;