mirror of
https://github.com/chatmail/relay.git
synced 2026-08-10 18:40:51 +00:00
fix(smtp-server): Correct error when EOF while reading DATA (#168)
Log `Unexpected EoF while receiving DATA!` instead of `Malformed DATA line without CRLF ending!` Fixes: #165 Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
This commit is contained in:
committed by
GitHub
parent
893ceab107
commit
e9a63222e6
@@ -225,7 +225,10 @@ where
|
||||
let mut data_line = String::new();
|
||||
'data_read: loop {
|
||||
data_line.clear();
|
||||
reader.read_line(&mut data_line).await?;
|
||||
if reader.read_line(&mut data_line).await? == 0 {
|
||||
log::warn!("Unexpected EoF while receiving DATA! Closing connection.");
|
||||
break 'connection;
|
||||
}
|
||||
|
||||
if data_line == ".\r\n" {
|
||||
break 'data_read;
|
||||
|
||||
Reference in New Issue
Block a user