浏览代码

Increase sleep a bit between read retries

Baglio Tabifata 4 年之前
父节点
当前提交
e308114431
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/main/java/info/hkzlab/dupal/analyzer/board/boardio/DuPALManager.java

+ 1 - 1
src/main/java/info/hkzlab/dupal/analyzer/board/boardio/DuPALManager.java

@@ -87,7 +87,7 @@ public class DuPALManager {
                 
                 
                 while((resp == null) && (retries-- > 0)) {
                 while((resp == null) && (retries-- > 0)) {
                     resp = serport.readString();
                     resp = serport.readString();
-                    try { Thread.sleep(1); } catch(InterruptedException e) {};
+                    if(resp == null) try { Thread.sleep(5); } catch(InterruptedException e) {};
                 }
                 }
 
 
                 if(resp != null) resp = resp.trim();
                 if(resp != null) resp = resp.trim();