mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
Change SpawnedSubsystem type to log subsystem errors (#1878)
* Change SpawnedSubsystem type to log subsystem errors * Remove clone
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user