File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
cmd/chirpstack-gateway-bridge/cmd
internal/integration/mqtt Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ func init() {
6363 viper .SetDefault ("integration.mqtt.state_retained" , true )
6464 viper .SetDefault ("integration.mqtt.keep_alive" , 30 * time .Second )
6565 viper .SetDefault ("integration.mqtt.max_reconnect_interval" , time .Minute )
66- viper .SetDefault ("integration.mqtt.max_token_wait" , 5 * time .Second )
66+ viper .SetDefault ("integration.mqtt.max_token_wait" , time .Minute )
6767
6868 viper .SetDefault ("integration.mqtt.auth.generic.servers" , []string {"tcp://127.0.0.1:1883" })
6969 viper .SetDefault ("integration.mqtt.auth.generic.clean_session" , true )
Original file line number Diff line number Diff line change @@ -383,6 +383,9 @@ func (b *Backend) connect() error {
383383 return errors .Wrap (err , "integration/mqtt: update authentication error" )
384384 }
385385
386+ if b .conn != nil {
387+ b .conn .Disconnect (250 )
388+ }
386389 b .conn = paho .NewClient (b .clientOpts )
387390 if err := tokenWrapper (b .conn .Connect (), b .maxTokenWait ); err != nil {
388391 return err
You can’t perform that action at this time.
0 commit comments