1
1
Fork 0
mirror of https://github.com/mjl-/mox.git synced 2025-04-21 21:40:01 +03:00

smtpserver: when doing slow writes due to spammy incoming delivery, try a bit harder to prevent a timeout for the other side (if it is mox/itself!)

based on question from wneessen
This commit is contained in:
Mechiel Lukkien 2025-01-13 11:13:26 +01:00
parent b8bf99e082
commit 5a14a5b067
No known key found for this signature in database

View file

@ -690,7 +690,7 @@ func (c *conn) Write(buf []byte) (int, error) {
// Make sure we don't take too long, otherwise the remote SMTP client may close the
// connection.
if time.Until(deadline) < 2*badClientDelay {
if time.Until(deadline) < 5*badClientDelay {
chunk = len(buf)
}
}