From: Pieter Baauw Date: Fri, 12 Feb 2016 13:35:20 +0000 (+0100) Subject: MINOR: mailers: increase default timeout to 10 seconds X-Git-Tag: v1.7-dev2~88 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46af170e41d534d7d8b90b50667879d741359d95;p=thirdparty%2Fhaproxy.git MINOR: mailers: increase default timeout to 10 seconds 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 --- diff --git a/include/common/defaults.h b/include/common/defaults.h index d1994e83f6..1c971d9f36 100644 --- a/include/common/defaults.h +++ b/include/common/defaults.h @@ -146,6 +146,7 @@ #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 diff --git a/src/checks.c b/src/checks.c index bc7eaa7eb2..9d6d33e5b5 100644 --- a/src/checks.c +++ b/src/checks.c @@ -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;