From e373cd8e01d96c78b1b7f43485d1b029dbf3221b Mon Sep 17 00:00:00 2001 From: caixiang <939387484@qq.com> Date: Tue, 9 Aug 2022 14:16:03 +0800 Subject: [PATCH] mark --- .../dc/s7/my/s7connector/enmuc/S7Client.java | 82 ++++++++++--------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/src/main/java/com/qgs/dc/s7/my/s7connector/enmuc/S7Client.java b/src/main/java/com/qgs/dc/s7/my/s7connector/enmuc/S7Client.java index 055859c..731caa8 100644 --- a/src/main/java/com/qgs/dc/s7/my/s7connector/enmuc/S7Client.java +++ b/src/main/java/com/qgs/dc/s7/my/s7connector/enmuc/S7Client.java @@ -283,41 +283,41 @@ public enum S7Client { } private void check_ping(){ - while (true){ - try { - ScheduledFuture schedule = ping_fail_check.schedule(new Runnable() { - @Override - public void run() { - if (connections.size() != coreSize) { - int c = coreSize - connections.size(); - for (int z = 0; z < c; z++) { + ping_fail_check.execute(new Runnable() { + @Override + public void run() { + while (true){ + try { + if(connections.size()!=coreSize){ + int c = coreSize-connections.size(); + for(int z=0;z schedule = executor.schedule(new Runnable() { - @Override - public void run() { - for (int i = 0; i < coreSize; i++) { + executor.execute(new Runnable() { + @Override + public void run() { + while (true){ + try { + for(int i=0;i