Change SpawnedSubsystem type to log subsystem errors (#1878)

* Change SpawnedSubsystem type to log subsystem errors

* Remove clone
This commit is contained in:
Fedor Sakharov authored and GitHub committed 2020-10-28 20:57:06 +01:00
1 parent 8a305ac963
commit 935fcd1666
16 files changed
+42 -27

No files matched your search

+3 -3
View File
@@ -164,7 +164,7 @@ pub struct SpawnedSubsystem {
/// Name of the subsystem being spawned.
pub name: &'static str,
/// The task of the subsystem being spawned.
pub future: BoxFuture<'static, ()>,
pub future: BoxFuture<'static, SubsystemResult<()>>,
}
/// A `Result` type that wraps [`SubsystemError`].
@@ -233,8 +233,8 @@ impl<C: SubsystemContext> Subsystem<C> for DummySubsystem {
let future = Box::pin(async move {
loop {
match ctx.recv().await {
Ok(FromOverseer::Signal(OverseerSignal::Conclude)) => return,
Err(_) => return,
Ok(FromOverseer::Signal(OverseerSignal::Conclude)) => return Ok(()),
Err(_) => return Ok(()),
_ => continue,
}
}