You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.5 KiB

  1. From fc940eb2bf0bbd7adf5b283f28bcff136501ae7f Mon Sep 17 00:00:00 2001
  2. From: Willy Tarreau <w@1wt.eu>
  3. Date: Fri, 13 Mar 2015 16:18:25 +0100
  4. Subject: [PATCH 4/9] BUG/MEDIUM: peers: correctly configure the client timeout
  5. The peers frontend timeout was mistakenly set on timeout.connect instead
  6. of timeout.client, resulting in no timeout being applied to the peers
  7. connections. The impact is just that peers can establish connections and
  8. remain connected until they speak. Once they start speaking, only one of
  9. them will still be accepted, and old sessions will be killed, so the
  10. problem is limited. This fix should however be backported to 1.5 since
  11. it was introduced in 1.5-dev3 with peers.
  12. (cherry picked from commit 9ff95bb18c4cd9ae747fa5b3bef6d3f94e54172f)
  13. ---
  14. src/cfgparse.c | 2 +-
  15. 1 file changed, 1 insertion(+), 1 deletion(-)
  16. diff --git a/src/cfgparse.c b/src/cfgparse.c
  17. index a91e027..b7613b8 100644
  18. --- a/src/cfgparse.c
  19. +++ b/src/cfgparse.c
  20. @@ -1834,7 +1834,7 @@ int cfg_parse_peers(const char *file, int linenum, char **args, int kwm)
  21. curpeers->peers_fe->cap = PR_CAP_FE;
  22. curpeers->peers_fe->maxconn = 0;
  23. curpeers->peers_fe->conn_retries = CONN_RETRIES;
  24. - curpeers->peers_fe->timeout.connect = 5000;
  25. + curpeers->peers_fe->timeout.client = MS_TO_TICKS(5000);
  26. curpeers->peers_fe->accept = peer_accept;
  27. curpeers->peers_fe->options2 |= PR_O2_INDEPSTR | PR_O2_SMARTCON | PR_O2_SMARTACC;
  28. curpeers->peers_fe->conf.args.file = curpeers->peers_fe->conf.file = strdup(file);
  29. --
  30. 2.0.5