mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 19:01:08 +00:00
have av-store bail when recv() fails (#5418)
This commit is contained in:
@@ -355,6 +355,9 @@ pub enum Error {
|
||||
#[error(transparent)]
|
||||
Subsystem(#[from] SubsystemError),
|
||||
|
||||
#[error("Context signal channel closed")]
|
||||
ContextChannelClosed,
|
||||
|
||||
#[error(transparent)]
|
||||
Time(#[from] SystemTimeError),
|
||||
|
||||
@@ -374,6 +377,7 @@ impl Error {
|
||||
Self::Io(_) => true,
|
||||
Self::Oneshot(_) => true,
|
||||
Self::CustomDatabase => true,
|
||||
Self::ContextChannelClosed => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
@@ -563,7 +567,7 @@ where
|
||||
{
|
||||
select! {
|
||||
incoming = ctx.recv().fuse() => {
|
||||
match incoming? {
|
||||
match incoming.map_err(|_| Error::ContextChannelClosed)? {
|
||||
FromOverseer::Signal(OverseerSignal::Conclude) => return Ok(true),
|
||||
FromOverseer::Signal(OverseerSignal::ActiveLeaves(
|
||||
ActiveLeavesUpdate { activated, .. })
|
||||
|
||||
Reference in New Issue
Block a user