mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-01 16:31:07 +00:00
Ensure candidate-backing and provisioner exit on missing Overseer (#6939)
This ensures that both subsystems exit when the Overseer has exited because of some error.
This commit is contained in:
1 parent
74e5b8c67b
commit
c7b3352b79
4 files changed
+12
-2
No files matched your search
@@ -70,6 +70,10 @@ pub enum Error {
|
||||
|
||||
#[error(transparent)]
|
||||
SubsystemError(#[from] SubsystemError),
|
||||
|
||||
#[fatal]
|
||||
#[error(transparent)]
|
||||
OverseerExited(SubsystemError),
|
||||
}
|
||||
|
||||
/// Utility for eating top level errors and log them.
|
||||
|
||||
@@ -199,7 +199,8 @@ async fn run_iteration<Context>(
|
||||
}
|
||||
}
|
||||
from_overseer = ctx.recv().fuse() => {
|
||||
match from_overseer? {
|
||||
// Map the error to ensure that the subsystem exits when the overseer is gone.
|
||||
match from_overseer.map_err(Error::OverseerExited)? {
|
||||
FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => handle_active_leaves_update(
|
||||
&mut *ctx,
|
||||
update,
|
||||
|
||||
Reference in new issue
Block a user