From a9fa2fe7c72279cecc916bb63cee154cdea67b54 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期五, 03 十一月 2023 16:14:15 +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