zhangqian
2023-08-28 adc5f83146f898cd2743313e619fff47141799f7
pkg/plc/plc4x.go
@@ -46,8 +46,8 @@
         return conn, nil
      }
   }
   // 创建一个上下文,并设置 5 秒超时
   ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
   // 创建一个上下文,并设置 3 秒超时
   ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
   defer cancel()
   conn, err := NewGetModbusConnection(ctx, ipAddr)
   if err != nil {