when error comes before initialization
This commit is contained in:
parent
18582d7b65
commit
5cc40d4525
@ -299,8 +299,7 @@ impl<Executor, Transport> JobSession<Executor, Transport> where Executor: JobExe
|
||||
return Err(Error::ConsensusUnreachable);
|
||||
}
|
||||
|
||||
let active_data = self.data.active_data.as_mut()
|
||||
.expect("we have checked that we are on master node; on master nodes active_data is filled during initialization; qed");
|
||||
if let Some(active_data) = self.data.active_data.as_mut() {
|
||||
if active_data.rejects.contains(node) {
|
||||
return Ok(());
|
||||
}
|
||||
@ -316,6 +315,7 @@ impl<Executor, Transport> JobSession<Executor, Transport> where Executor: JobExe
|
||||
self.data.state = JobSessionState::Failed;
|
||||
return Err(Error::ConsensusUnreachable);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user