mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Preserve client sent config appropriately (#8566)
This commit is contained in:
parent
c3771df641
commit
0a56e33ce1
@ -466,14 +466,10 @@ func (c Config) SetKVS(s string, defaultKVS map[string]KVS) error {
|
||||
tgt = subSystemValue[1]
|
||||
}
|
||||
|
||||
_, ok := c[subSys][tgt]
|
||||
if !ok {
|
||||
c[subSys][tgt] = KVS{}
|
||||
} else {
|
||||
c[subSys][tgt] = kvs
|
||||
}
|
||||
// Save client sent kvs
|
||||
c[subSys][tgt] = kvs
|
||||
|
||||
_, ok = c[subSys][tgt].Lookup(State)
|
||||
_, ok := c[subSys][tgt].Lookup(State)
|
||||
if !ok {
|
||||
// implicit state "on" if not specified.
|
||||
c[subSys][tgt] = append(c[subSys][tgt], KV{
|
||||
|
@ -564,6 +564,7 @@ func GetNotifyMQTT(mqttKVS map[string]config.KVS, rootCAs *x509.CertPool) (map[s
|
||||
if k != config.Default {
|
||||
brokerEnv = brokerEnv + config.Default + k
|
||||
}
|
||||
|
||||
brokerURL, err := xnet.ParseURL(env.Get(brokerEnv, kv.Get(target.MqttBroker)))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user