mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
smtpsrv: Don't consider client EOF an error
When the client closes the connection, which is very common, chasquid
logs it as an error ("exiting with error: EOF").
That can be confusing and mislead users, and also makes a lot of
traces be marked as errored, when nothing wrong occurred.
So this patch changes the log to not treat it as an error.
This commit is contained in:
@@ -280,7 +280,11 @@ loop:
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
c.tr.Errorf("exiting with error: %v", err)
|
||||
if err == io.EOF {
|
||||
c.tr.Debugf("client closed the connection")
|
||||
} else {
|
||||
c.tr.Errorf("exiting with error: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user