diff --git a/src/message.rs b/src/message.rs index 922ee4c..4eac0b5 100644 --- a/src/message.rs +++ b/src/message.rs @@ -118,6 +118,11 @@ impl Message { } async fn print_line(&self, line: &[u8]) -> Result<()> { + let line = if line.ends_with(&[b'\r']) { + &line[..line.len() - 1] + } else { + line + }; let mut stdout = BufWriter::new(tokio::io::stdout()); stdout.write_all(RETURN_START).await?; stdout.write_all(self.session_id.as_bytes()).await?;