From 24b27647f24c5dde68fb3df5214b79795665ca3d Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期四, 20 四月 2023 13:47:54 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/thread/BarcodeThread.java | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/BarcodeThread.java b/src/main/java/com/zy/core/thread/BarcodeThread.java
index d0b775e..2bca652 100644
--- a/src/main/java/com/zy/core/thread/BarcodeThread.java
+++ b/src/main/java/com/zy/core/thread/BarcodeThread.java
@@ -65,7 +65,7 @@
connect();
while (true) {
try {
- byte[] read = read(16, 200);
+ byte[] read = read(50, 200);
if (null != read) {
String s = new String(read);
if (!Cools.isEmpty(s)) {
@@ -79,10 +79,14 @@
}
OutputQueue.BARCODE.offer(jsonObject);
}
+ }else{
+ barcode = "";
}
Thread.sleep(50);
} catch (SocketTimeoutException ignore) {
+// barcode="";
} catch (Exception e) {
+ barcode="";
// e.printStackTrace();
}
}
--
Gitblit v1.9.1