Skip to content

Commit 6723608

Browse files
authored
agent: fix missing return (#100)
1 parent be65aaf commit 6723608

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

agent/src/exec.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,14 +289,15 @@ fn run_common(
289289
)
290290
.unwrap();
291291

292-
/*
293-
* Only send an exit notification if this is the primary task
294-
* process.
295-
*/
296-
if ab.bgproc.is_none() {
297-
tx.blocking_send(ab.exit(&start, &end, i32::MAX)).unwrap();
292+
if ab.bgproc.is_some() {
293+
/*
294+
* No further notifications are required for background
295+
* processes.
296+
*/
297+
return;
298298
}
299299

300+
tx.blocking_send(ab.exit(&start, &end, i32::MAX)).unwrap();
300301
false
301302
}
302303
Ok(es) => {
@@ -317,6 +318,7 @@ fn run_common(
317318
* No further notifications are required for background
318319
* processes.
319320
*/
321+
return;
320322
}
321323

322324
if let Some(sig) = es.signal() {

0 commit comments

Comments
 (0)