aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-05-17 18:43:47 +0200
committerAlex Auvolat <alex@adnab.me>2022-05-17 18:43:47 +0200
commit70383b4363c9d9d1ddebcb29c60f833022e97d24 (patch)
tree82c676e129f9a7cc2ff1bec7df85de2a3c02905a /src/rpc
parent440a577563c313f7ce6fe928ff9a18ac1ad0deb3 (diff)
downloadgarage-70383b4363c9d9d1ddebcb29c60f833022e97d24.tar.gz
garage-70383b4363c9d9d1ddebcb29c60f833022e97d24.zip
Implement ConnectClusterNodes
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/system.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/rpc/system.rs b/src/rpc/system.rs
index eb2f2e42..78d538ec 100644
--- a/src/rpc/system.rs
+++ b/src/rpc/system.rs
@@ -383,10 +383,14 @@ impl System {
}
}
}
- return Err(Error::Message(format!(
- "Could not connect to specified peers. Errors: {:?}",
- errors
- )));
+ if errors.len() == 1 {
+ return Err(Error::Message(errors[0].1.to_string()));
+ } else {
+ return Err(Error::Message(format!(
+ "Could not connect to specified peers. Errors: {:?}",
+ errors
+ )));
+ }
}
// ---- INTERNALS ----