Disable keepalive in mqtt output. (#3779)
This functionality currently has race conditions that can result in the output deadlocking.
This commit is contained in:
parent
fcd6d4eb09
commit
8c932abff6
|
@ -162,6 +162,7 @@ func (m *MQTT) publish(topic string, body []byte) error {
|
|||
|
||||
func (m *MQTT) createOpts() (*paho.ClientOptions, error) {
|
||||
opts := paho.NewClientOptions()
|
||||
opts.KeepAlive = 0 * time.Second
|
||||
|
||||
if m.Timeout.Duration < time.Second {
|
||||
m.Timeout.Duration = 5 * time.Second
|
||||
|
|
Loading…
Reference in New Issue