Browse Source

sleep through read retries

Baglio Tabifata 4 năm trước cách đây
mục cha
commit
7b2e79613f
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      src/net/hkzlab/dupal/boardio/DuPALManager.java

+ 2 - 1
src/net/hkzlab/dupal/boardio/DuPALManager.java

@@ -87,8 +87,9 @@ public class DuPALManager {
                 
                 while((resp == null) && (retries-- > 0)) {
                     resp = serport.readString();
+                    try { Thread.sleep(1); } catch(InterruptedException e) {};
                 }
-                
+
                 if(resp != null) resp = resp.trim();
                 
                 logger.debug("Response <- " + resp);