Pass real server info to the client (#10)

This commit is contained in:
Lev Kokotov
2022-02-11 22:19:49 -08:00
committed by GitHub
parent ab8573c94f
commit 526b9eb666
5 changed files with 56 additions and 9 deletions

View File

@@ -90,6 +90,11 @@ pub async fn parse(path: &str) -> Result<Config, Error> {
let mut dup_check = HashSet::new();
let mut primary_count = 0;
if shard.1.servers.len() == 0 {
println!("> Shard {} has no servers configured", shard.0);
return Err(Error::BadConfig);
}
for server in &shard.1.servers {
dup_check.insert(server);