From 90655207168457cc5748ca19c1c3c75dd6b1af68 Mon Sep 17 00:00:00 2001
From: DELL <1525436766@qq.com>
Date: 星期六, 19 十月 2024 14:17:16 +0800
Subject: [PATCH] 南网电源通信程序更新

---
 IEC61850_ForPowerSupply_ForNW/src/com/power/comm/Power_61850_SocketClient.java |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/IEC61850_ForPowerSupply_ForNW/src/com/power/comm/Power_61850_SocketClient.java b/IEC61850_ForPowerSupply_ForNW/src/com/power/comm/Power_61850_SocketClient.java
index a474d80..18a72aa 100644
--- a/IEC61850_ForPowerSupply_ForNW/src/com/power/comm/Power_61850_SocketClient.java
+++ b/IEC61850_ForPowerSupply_ForNW/src/com/power/comm/Power_61850_SocketClient.java
@@ -131,6 +131,13 @@
 				m_Association = m_ClientSap.associate(InetAddress.getByName(pwrDev_rtData.PowerDevDeviceIp), 102, null, null);
 			} catch (Exception e) {
 				logger.debug("PowerDev_IEC61850_Client Unable to connect to device IP:" + pwrDev_rtData.PowerDevDeviceIp);
+				if(null != m_Association) {
+					try {
+						m_Association.close();
+					} catch (Exception e1) {
+						e1.printStackTrace();
+					}
+				}
 				continue;
 			}
 			

--
Gitblit v1.9.1