File tree 2 files changed +4
-1
lines changed
cmd/chirpstack-gateway-bridge/cmd
internal/integration/mqtt
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ func init() {
63
63
viper .SetDefault ("integration.mqtt.state_retained" , true )
64
64
viper .SetDefault ("integration.mqtt.keep_alive" , 30 * time .Second )
65
65
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 )
67
67
68
68
viper .SetDefault ("integration.mqtt.auth.generic.servers" , []string {"tcp://127.0.0.1:1883" })
69
69
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 {
383
383
return errors .Wrap (err , "integration/mqtt: update authentication error" )
384
384
}
385
385
386
+ if b .conn != nil {
387
+ b .conn .Disconnect (250 )
388
+ }
386
389
b .conn = paho .NewClient (b .clientOpts )
387
390
if err := tokenWrapper (b .conn .Connect (), b .maxTokenWait ); err != nil {
388
391
return err
You can’t perform that action at this time.
0 commit comments