From 913094fb264f6fdf3ee890231c85867c388e8e37 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 25 一月 2021 10:00:22 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/thread/BarcodeThread.java | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/BarcodeThread.java b/src/main/java/com/zy/core/thread/BarcodeThread.java
index 6555d84..6c859db 100644
--- a/src/main/java/com/zy/core/thread/BarcodeThread.java
+++ b/src/main/java/com/zy/core/thread/BarcodeThread.java
@@ -41,12 +41,15 @@
// write("T".getBytes(), "T".length());
byte[] read = read(11, 200);
if (null != read) {
- barcode = new String(read);
+ String s = new String(read);
+ if (!Cools.isEmpty(s)) {
+ barcode = new String(read);
+ }
}
Thread.sleep(100);
} catch (SocketTimeoutException ignore) {
} catch (Exception e) {
- e.printStackTrace();
+// e.printStackTrace();
}
}
}
--
Gitblit v1.9.1