Skip to content
Snippets Groups Projects
Unverified Commit cdca81c9 authored by Daniel Nelson's avatar Daniel Nelson
Browse files

Fix mqtt_consumer connection_timeout test

parent ed6f438c
No related branches found
No related tags found
No related merge requests found
......@@ -121,8 +121,8 @@ func (m *MQTTConsumer) Start(acc telegraf.Accumulator) error {
return fmt.Errorf("MQTT Consumer, invalid QoS value: %d", m.QoS)
}
if int(m.ConnectionTimeout.Duration) <= 0 {
return fmt.Errorf("MQTT Consumer, invalid connection_timeout value: %d", m.ConnectionTimeout)
if m.ConnectionTimeout.Duration < 1*time.Second {
return fmt.Errorf("MQTT Consumer, invalid connection_timeout value: %s", m.ConnectionTimeout.Duration)
}
opts, err := m.createOpts()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment