mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 20:20:25 +03:00
make sure to comply with MQTT spec (#14037)
- keep-alive cannot be 0 by default anymore - client_id cannot be empty fixes #13993
This commit is contained in:
@@ -209,8 +209,12 @@ func NewMQTTTarget(id string, args MQTTArgs, doneCh <-chan struct{}, loggerOnce
|
||||
args.MaxReconnectInterval = 10 * time.Minute
|
||||
}
|
||||
|
||||
if args.KeepAlive == 0 {
|
||||
args.KeepAlive = 10 * time.Second
|
||||
}
|
||||
|
||||
options := mqtt.NewClientOptions().
|
||||
SetClientID("").
|
||||
SetClientID(id).
|
||||
SetCleanSession(true).
|
||||
SetUsername(args.User).
|
||||
SetPassword(args.Password).
|
||||
|
||||
Reference in New Issue
Block a user