Junjie
2024-02-23 3b64c807f60e5d6b71deca3f79c9be4be19abfaa
src/main/java/com/zy/core/thread/BarcodeThread.java
@@ -99,21 +99,19 @@
        connect();
        while (true) {
            try {
                byte[] read = read(14, 5000);
                byte[] read = read(14, 15000);
                if (null != read) {
                    String s = new String(read);
                    if (!Cools.isEmpty(s)) {
                        setBarcode(new String(read));
                    }
                }else{
                    setBarcode("");
                }
                Thread.sleep(50);
            } catch (SocketTimeoutException ignore) {
                connCount++;
            } catch (Exception e) {
            }catch (Exception e) {
                setBarcode("");
                e.printStackTrace();
                log.error("run" + e);
//                e.printStackTrace();
                connect();
            }
        }
    }