Skip to content

Commit

Permalink
break when there's nothing to read
Browse files Browse the repository at this point in the history
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
  • Loading branch information
sywangyi committed Sep 28, 2024
1 parent 5b6b74e commit 6d95155
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions launcher/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,8 @@ fn shard_manager(
if let Ok(n) = stdin.read(&mut buffer) {
if n > 0 {
let _ = pstdin.write_all(&buffer[..n]);
} else {
break;
}
}
}
Expand Down Expand Up @@ -1063,6 +1065,8 @@ fn log_lines<R: Sized + Read>(mut bufread: BufReader<R>) {
}
}
}
} else {
break;
}
}
}
Expand Down

0 comments on commit 6d95155

Please sign in to comment.