Fix bug with validator services exiting on error

This commit is contained in:
Paul Hauner
2019-11-25 18:19:41 +11:00
parent ae535ea33a
commit ebfa1f53d6
4 changed files with 4 additions and 12 deletions

View File

@@ -165,9 +165,7 @@ impl<T: SlotClock + 'static, E: EthSpec> AttestationService<T, E> {
}
Ok(())
})
// Prevent any errors from escaping and stopping the interval.
.then(|_| Ok(())),
}),
)
.map(move |_| info!(log_3, "Shutdown complete")),
);

View File

@@ -146,9 +146,7 @@ impl<T: SlotClock + 'static, E: EthSpec> BlockService<T, E> {
"error" => format!("{}", e)
}
})
.for_each(move |_| service.clone().do_update())
// Prevent any errors from escaping and stopping the interval.
.then(|_| Ok(())),
.for_each(move |_| service.clone().do_update().then(|_| Ok(()))),
)
.map(move |_| info!(log_2, "Shutdown complete")),
);

View File

@@ -268,9 +268,7 @@ impl<T: SlotClock + 'static, E: EthSpec> DutiesService<T, E> {
"error" => format!("{}", e)
}
})
.for_each(move |_| service.clone().do_update())
// Prevent any errors from escaping and stopping the interval.
.then(|_| Ok(())),
.for_each(move |_| service.clone().do_update().then(|_| Ok(()))),
)
.map(move |_| info!(log_2, "Shutdown complete")),
);

View File

@@ -136,9 +136,7 @@ impl<T: SlotClock + 'static, E: EthSpec> ForkService<T, E> {
"error" => format!("{}", e)
}
})
.for_each(move |_| service.do_update())
// Prevent any errors from escaping and stopping the interval.
.then(|_| Ok(())),
.for_each(move |_| service.do_update().then(|_| Ok(()))),
)
.map(move |_| info!(log_2, "Shutdown complete")),
);