Skip to content

Commit

Permalink
network: guard validation network future under exit signal (paritytec…
Browse files Browse the repository at this point in the history
  • Loading branch information
andresilva authored Mar 4, 2019
1 parent 82fab47 commit af6c35f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion network/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ impl<P, E, N, T> ParachainNetwork for ValidationNetwork<P, E, N, T> where

let table_router_clone = table_router.clone();
let executor = self.executor.clone();
let exit = self.exit.clone();

// spin up a task in the background that processes all incoming statements
// TODO: propagate statements on a timer?
Expand All @@ -248,7 +249,7 @@ impl<P, E, N, T> ParachainNetwork for ValidationNetwork<P, E, N, T> where
table_router: table_router_clone,
};

executor.spawn(process_task);
executor.spawn(process_task.select(exit).then(|_| Ok(())));
});

table_router
Expand Down

0 comments on commit af6c35f

Please sign in to comment.