diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java index e96fd86..8ba5511 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java @@ -185,7 +185,7 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC Object his = accessor_value.getValue(itemId); if (itemState.getQuality()==QualityTypeValue.OPC_QUALITY_GOOD && his != null) { log.warn("opc 值不健康 item: {}, 状态: {}", itemId, itemState.getQuality()); - valueAllNotNull = true; + valueAllNotNull = false; } if (!UnifiedDataAppService.isEquals(value, his)) { @@ -218,8 +218,8 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC if (log.isWarnEnabled()) { log.warn("{} 所有内容都为空, all_null:{} ,暂定{}s", tag, all_null,5000 + random); } - - ThreadUtl.sleep((long) (5000 + random)); + ThreadUtl.sleep((long) ((new Random()).nextInt(3) +1) * 1000); + break start; } else if (this.all_null < 6) { if (log.isWarnEnabled()) { log.warn(tag + "重新创建server");