Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: WiFi neurGAI_WIFI thingspeak thingspeak2
Diff: Socket/UDPSocket.cpp
- Revision:
- 6:f281180726e8
- Parent:
- 4:74bfdd00362a
- Child:
- 11:b912f91e3212
--- a/Socket/UDPSocket.cpp	Thu Aug 23 10:37:27 2012 +0000
+++ b/Socket/UDPSocket.cpp	Thu Aug 23 11:49:33 2012 +0000
@@ -83,6 +83,7 @@
     Timer tmr;
     int idx = 0;
     int nb_available = 0;
+    int time = -1;
 
 
 
@@ -97,7 +98,7 @@
 
     tmr.start();
 
-    while (tmr.read_ms() < _timeout) {
+    while (time < _timeout) {
 
         nb_available = wifi->readable();
         for (int i = 0; i < min(nb_available, length); i++) {
@@ -108,6 +109,8 @@
         if (idx == length) {
             break;
         }
+        
+        time = tmr.read_ms();
     }
 
     readEndpoint(remote);