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 @@ -62,7 +62,7 @@ func init() {
62
62
viper .SetDefault ("integration.mqtt.state_retained" , true )
63
63
viper .SetDefault ("integration.mqtt.keep_alive" , 30 * time .Second )
64
64
viper .SetDefault ("integration.mqtt.max_reconnect_interval" , time .Minute )
65
- viper .SetDefault ("integration.mqtt.max_token_wait" , 5 * time .Second )
65
+ viper .SetDefault ("integration.mqtt.max_token_wait" , time .Minute )
66
66
67
67
viper .SetDefault ("integration.mqtt.auth.generic.servers" , []string {"tcp://127.0.0.1:1883" })
68
68
viper .SetDefault ("integration.mqtt.auth.generic.clean_session" , true )
Original file line number Diff line number Diff line change @@ -379,6 +379,9 @@ func (b *Backend) connect() error {
379
379
return errors .Wrap (err , "integration/mqtt: update authentication error" )
380
380
}
381
381
382
+ if b .conn != nil {
383
+ b .conn .Disconnect (250 )
384
+ }
382
385
b .conn = paho .NewClient (b .clientOpts )
383
386
if err := tokenWrapper (b .conn .Connect (), b .maxTokenWait ); err != nil {
384
387
return err
You can’t perform that action at this time.
0 commit comments