From cab6eea89a0d82710369604ecb51f1cdb122e433 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 19 十月 2023 17:26:34 +0800
Subject: [PATCH] fix

---
 pkg/plc/plc4x.go |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/pkg/plc/plc4x.go b/pkg/plc/plc4x.go
index d99b5a2..68562a6 100644
--- a/pkg/plc/plc4x.go
+++ b/pkg/plc/plc4x.go
@@ -33,15 +33,11 @@
 	if !ok {
 		return nil, false
 	}
-	connOK, err := cm.CheckConnect(conn, time.Second*1)
-	if err != nil {
-		logx.Errorf("ping plc err:%v", err.Error())
-		return nil, false
-	}
-	if connOK {
-		return conn, ok
-	}
-	return nil, false
+	//if ok, _ := cm.CheckConnect(conn, time.Second); !ok {
+	//	conn.Close()
+	//}
+
+	return conn, true
 }
 
 var connectionManager = newPlcConnectionManager()

--
Gitblit v1.8.0