From 681563934aea8ed294718612b84e63a591451ddb Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Tue, 17 Sep 2019 17:11:30 +0200 Subject: [PATCH] Reset the "force_read" flag --- opensmtpd/src/input/stdin.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opensmtpd/src/input/stdin.rs b/opensmtpd/src/input/stdin.rs index bd483b3..20860eb 100644 --- a/opensmtpd/src/input/stdin.rs +++ b/opensmtpd/src/input/stdin.rs @@ -36,6 +36,8 @@ impl FilterInput for StdIn { let mut force_read = false; loop { if force_read || self.input.is_empty() { + // Reset the flag + force_read = false; // Read stdin in self.buffer self.buffer.copy_from_slice(&[0; BUFFER_SIZE]); let len = self.stdin.read(&mut self.buffer)?;