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()