mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
util: implement FusedStream for Jobs (#2031)
This commit is contained in:
@@ -674,6 +674,17 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<Spawner, Job> stream::FusedStream for Jobs<Spawner, Job>
|
||||
where
|
||||
Spawner: SpawnNamed,
|
||||
Job: JobTrait,
|
||||
{
|
||||
fn is_terminated(&self) -> bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// A basic implementation of a subsystem.
|
||||
///
|
||||
/// This struct is responsible for handling message traffic between
|
||||
@@ -762,7 +773,7 @@ where
|
||||
).await {
|
||||
break
|
||||
},
|
||||
outgoing = jobs.next().fuse() => {
|
||||
outgoing = jobs.next() => {
|
||||
if let Err(e) = Self::handle_from_job(outgoing, &mut ctx).await {
|
||||
tracing::warn!(err = ?e, "failed to handle command from job");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user