Skip to content

Commit

Permalink
use old state to restart the child (#289)
Browse files Browse the repository at this point in the history
Signed-off-by: பாலாஜி <[email protected]>
  • Loading branch information
poonai authored Dec 3, 2020
1 parent 44f433f commit a478cc6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/bastion/src/children.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,14 +616,12 @@ impl Children {
let children = self.as_ref();
let supervisor = self.bcast.parent().clone().into_supervisor();

let state = Arc::new(Box::pin(ContextState::new()));

let ctx = BastionContext::new(
id.clone(),
child_ref.clone(),
children,
supervisor,
state.clone(),
old_state.clone(),
);
let exec = (self.init.0)(ctx);

Expand All @@ -643,6 +641,7 @@ impl Children {

debug!("Children({}): Restarting Child({}).", self.id(), bcast.id());
let callbacks = self.callbacks.clone();
let state = Arc::new(Box::pin(ContextState::new()));
let child = Child::new(exec, callbacks, bcast, state, child_ref);
debug!(
"Children({}): Launching faulted Child({}).",
Expand Down

0 comments on commit a478cc6

Please sign in to comment.