File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
internal/integration/mqtt Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ func NewBackend(conf config.Config) (*Backend, error) {
118118 }
119119
120120 b .clientOpts .SetProtocolVersion (4 )
121- b .clientOpts .SetAutoReconnect (false )
121+ b .clientOpts .SetAutoReconnect (true ) // this is required for buffering messages in case offline!
122122 b .clientOpts .SetOnConnectHandler (b .onConnected )
123123 b .clientOpts .SetConnectionLostHandler (b .onConnectionLost )
124124
@@ -288,7 +288,6 @@ func (b *Backend) onConnected(c paho.Client) {
288288func (b * Backend ) onConnectionLost (c paho.Client , err error ) {
289289 mqttDisconnectCounter ().Inc ()
290290 log .WithError (err ).Error ("mqtt: connection error" )
291- b .connectLoop ()
292291}
293292
294293func (b * Backend ) handleDownlinkFrame (c paho.Client , msg paho.Message ) {
You can’t perform that action at this time.
0 commit comments