fuliqi
2025-02-13 9963456cd3d9737ecf53ebc1f464df29fd9398e6
ycl-server/src/main/java/com/ycl/utils/CheckPointUtil.java
@@ -61,7 +61,6 @@
            res = selfHttpUtil.get(prefix + monitor.getIp(), null, null);
            monitor.setPingOnline(Objects.nonNull(res) && HttpStatus.OK == res.getStatusCode());
        } catch (Exception e) {
            log.error("web检测离线"+monitor.getIp());
            monitor.setPingOnline(Boolean.FALSE);
        }
        // 如果http得到的不在线,那么再ping一下
@@ -87,7 +86,6 @@
        }
        if (!monitor.getPingOnline()) {
            reachable = checkPing(monitor, reachable);
            if(!reachable) log.error("ping检测离线"+monitor.getIp());
            monitor.setPingOnline(reachable);
        }
        if (!monitor.getPingOnline()) {
@@ -130,7 +128,7 @@
                Thread.sleep(sleepTime);
            }
        } catch (Exception e) {
            log.error("Ping异常{}",e.getMessage());
            log.error("Ping异常",e);
        }
        return reachable;
    }