diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 9ebd103..68f62dc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -90,7 +90,12 @@ async fn main() -> anyhow::Result<()> { let program = program.clone(); let p = p.clone(); tokio::spawn(async move { - match timeout(conf.timeout, run(&program, &p)).await { + match timeout( + program.timeout.unwrap_or(conf.timeout), + run(&program.command, &p), + ) + .await + { Err(_) => eprintln!( "error: Execution of {program:?} for message {p:?} timed out" ), |