]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mailers: increase default timeout to 10 seconds
authorPieter Baauw <piba.nl.dev@gmail.com>
Fri, 12 Feb 2016 13:35:20 +0000 (14:35 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 17 Feb 2016 09:19:08 +0000 (10:19 +0100)
This allows the tcp connection to send multiple SYN packets, so 1 lost
packet does not cause the mail to be lost. It changes the socket timeout
from 2 to 10 seconds, this allows for 3 syn packets to be send and
waiting a little for their reply.

This patch should be backported to 1.6.

Acked-by: Simon Horman <horms@verge.net.au>
include/common/defaults.h
src/checks.c

index d1994e83f60a3caa914df74942026b1d48d8b5c1..1c971d9f3655553bde3910c2d66fdd8daf247693 100644 (file)
 
 #define        CHK_CONNTIME    2000
 #define        DEF_CHKINTR     2000
+#define DEF_MAILALERTTIME 10000
 #define DEF_FALLTIME    3
 #define DEF_RISETIME    2
 #define DEF_AGENT_FALLTIME    1
index bc7eaa7eb22f6adb7e813c9c689d577135e2e842..9d6d33e5b59fae0ddd560dd796a565893b92be57 100644 (file)
@@ -3108,7 +3108,7 @@ static int init_email_alert_checks(struct server *s)
 
                LIST_INIT(&q->email_alerts);
 
-               check->inter = DEF_CHKINTR; /* XXX: Would like to Skip to the next alert, if any, ASAP.
+               check->inter = DEF_MAILALERTTIME; /* XXX: Would like to Skip to the next alert, if any, ASAP.
                                             * But need enough time so that timeouts don't occur
                                             * during tcp check procssing. For now just us an arbitrary default. */
                check->rise = DEF_AGENT_RISETIME;