fix(targets): pass credentials to MQTT broker availability check (#2192)
Signed-off-by: houseme <[email protected]> Co-authored-by: Copilot Autofix powered by AI <[email protected]>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI
parent
b5d881f399
commit
9ce3c7742c
@@ -225,7 +225,9 @@ impl Operation for NotificationTarget {
|
||||
let topic = kv_map
|
||||
.get(rustfs_config::MQTT_TOPIC)
|
||||
.ok_or_else(|| s3_error!(InvalidArgument, "topic is required"))?;
|
||||
check_mqtt_broker_available(endpoint, topic)
|
||||
let username = kv_map.get(rustfs_config::MQTT_USERNAME).copied();
|
||||
let password = kv_map.get(rustfs_config::MQTT_PASSWORD).copied();
|
||||
check_mqtt_broker_available(endpoint, topic, username, password)
|
||||
.await
|
||||
.map_err(|e| s3_error!(InvalidArgument, "MQTT Broker unavailable: {}", e))?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user