maddy
maddy copied to clipboard
fix: reduce StaleKeyLifetimeSec to 4 minutes
RFC 5321 recommends idle time of 5 minutes. Maddy runs pool cleanup once per minute. When a connection is returned to the pool at time 'last cleanup + 10 seconds', it will be closed at 'last cleanup + StaleKeyLifetimeSec + 60 seconds' . With the original value of 5 minutes, the connection will be closed 50 seconds after the recommended timeout. By reducing the lifetime to 4 minutes, connections might be closed a little early, but never late.
Should fix #693