diff --git a/src/checks.c b/src/checks.c index 4022cad58..40fb698ef 100644 --- a/src/checks.c +++ b/src/checks.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -677,6 +678,14 @@ struct task *process_chk(struct task *t) } if (s->result == SRV_CHK_UNKNOWN) { +#ifdef TCP_QUICKACK + /* disabling tcp quick ack now allows + * the request to leave the machine with + * the first ACK. + */ + if (s->proxy->options2 & PR_O2_SMARTCON) + setsockopt(fd, SOL_TCP, TCP_QUICKACK, (char *) &zero, sizeof(zero)); +#endif if ((connect(fd, (struct sockaddr *)&sa, sizeof(sa)) != -1) || (errno == EINPROGRESS)) { /* OK, connection in progress or established */