From 2ac258501be0bcb0628548d5990de76ce7361ac8 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 20 Aug 2017 13:42:16 +0100 Subject: Logging: add elapsed-time element to unexpected-diconnection lines --- src/src/smtp_in.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 9721fb7d6..d6250d12d 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -5460,14 +5460,17 @@ while (done <= 0) */ if (sender_address != NULL || recipients_count > 0) - log_write(L_lost_incoming_connection, - LOG_MAIN, - "unexpected %s while reading SMTP command from %s%s", - sender_host_unknown? "EOF" : "disconnection", - host_and_ident(FALSE), smtp_read_error); - - else log_write(L_smtp_connection, LOG_MAIN, "%s lost%s", - smtp_get_connection_info(), smtp_read_error); + log_write(L_lost_incoming_connection, LOG_MAIN, + "unexpected %s while reading SMTP command from %s%s D=%s", + sender_host_unknown ? "EOF" : "disconnection", + host_and_ident(FALSE), smtp_read_error, + string_timesince(&smtp_connection_start) + ); + + else + log_write(L_smtp_connection, LOG_MAIN, "%s lost%s D=%s", + smtp_get_connection_info(), smtp_read_error, + string_timesince(&smtp_connection_start)); done = 1; break; -- cgit v1.2.3