From 093d3074c8d7b06c58ca6a0b6d281b916c5d95d1 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期一, 30 十月 2023 12:26:59 +0800
Subject: [PATCH] fix

---
 pkg/plc/modbusx/connection_manager.go |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/pkg/plc/modbusx/connection_manager.go b/pkg/plc/modbusx/connection_manager.go
index 4389fe5..57be879 100644
--- a/pkg/plc/modbusx/connection_manager.go
+++ b/pkg/plc/modbusx/connection_manager.go
@@ -3,7 +3,6 @@
 import (
 	"apsClient/conf"
 	"apsClient/model/common"
-	"apsClient/pkg/logx"
 	"github.com/goburrow/modbus"
 	"sync"
 	"time"
@@ -105,11 +104,5 @@
 	rtuHandler.StopBits = c.StopBit
 	rtuHandler.SlaveId = 1
 	rtuHandler.Timeout = 5 * time.Second
-
-	err := rtuHandler.Connect()
-	if err != nil {
-		logx.Errorf("getModbusRTUConnection  Connect err:%v, config: %+v", err, c)
-		return nil
-	}
 	return modbus.NewClient(rtuHandler)
 }

--
Gitblit v1.8.0