mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
add Error::SeedFailed
This commit is contained in:
@@ -140,6 +140,9 @@ pub enum Error {
|
||||
#[error("Channel timed out")]
|
||||
ChannelTimeout,
|
||||
|
||||
#[error("Failed to reach any seeds")]
|
||||
SeedFailed,
|
||||
|
||||
#[error("Network service stopped")]
|
||||
NetworkServiceStopped,
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ impl SeedSyncSession {
|
||||
join_all(tasks).await;
|
||||
|
||||
if failed.load(Ordering::SeqCst) == settings.seeds.len() {
|
||||
return Err(Error::ConnectFailed)
|
||||
return Err(Error::SeedFailed)
|
||||
}
|
||||
|
||||
// Seed process complete
|
||||
|
||||
@@ -54,7 +54,7 @@ impl StoppableTask {
|
||||
Arc::new(Self { stop_send, stop_recv, stop_barrier: CondVar::new() })
|
||||
}
|
||||
|
||||
/// Stops the task
|
||||
/// Stops the task. Will return when the process has fully closed.
|
||||
pub async fn stop(&self) {
|
||||
// Ignore any errors from this send
|
||||
let _ = self.stop_send.send(()).await;
|
||||
|
||||
Reference in New Issue
Block a user