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:
parent
b8bf99e082
commit
5a14a5b067
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue