Skip to main content

write_loop

Function write_loop 

Source
pub(super) async fn write_loop(
    socket: Arc<UnixSeqpacket>,
    attach: SharedContainerAttach,
    rx: Receiver<Message>,
    output_ended: bool,
    token: CancellationToken,
) -> Result<()>
Expand description

Forward the container output of attach to a client until the output ended or the client went away. Once the container exited, which cancels token, a process left behind may keep the output open, so forward only what arrives shortly after the exit, see Drain::recv_attach.