Skip to content

Commit 0bb7ad3

Browse files
committed
Update comment in RemoteChild::wait_with_output
Signed-off-by: Jiahao XU <[email protected]>
1 parent 771d6d8 commit 0bb7ad3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/child.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,12 @@ impl<'s> RemoteChild<'s> {
174174
// and cause the remote process to block forever.
175175
let (stdout, stderr) = try_join!(stdout_read, stderr_read)?;
176176
Ok(Output {
177-
// Once self.wait().await is done, the connection to the multiplex
178-
// server will also be dropped and the server will stop sending
179-
// data to stdout/stderr.
177+
// The self.wait() future terminates the stdout and stderr futures
178+
// when it resolves, even if there may still be more data arriving
179+
// from the server.
180+
//
181+
// Therefore, we wait for them first, and only once they're complete
182+
// do we wait for the process to have terminated.
180183
status: self.wait().await?,
181184
stdout,
182185
stderr,

0 commit comments

Comments
 (0)