diff options
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | src/main.rs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d65e12..9c7523f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ ### Fixed * Changelog 0.1.0 link now references the tag not an arbitrary diff. +* The entire MQTT message should now be attempted to be written (previously it + may have been cut off in some situations). ## [0.1.0] diff --git a/src/main.rs b/src/main.rs index 84ee406..edbfa1d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,7 @@ async fn run(program: &[String], message: &Publish) -> anyhow::Result<()> { } let mut proc = command.stdin(Stdio::piped()).spawn()?; let mut stdin = proc.stdin.take().context("No stdin")?; - stdin.write(&message.payload).await?; + stdin.write_all(&message.payload).await?; drop(stdin); println!("{}", proc.wait().await?); Ok(()) |