From: Christopher Faulet Date: Mon, 29 Aug 2022 09:32:26 +0000 (+0200) Subject: BUG/MEDIUM: peers: Add connect and server timeut to peers proxy X-Git-Tag: v2.7-dev5~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=13db4bdbc6e60bb54f7583ca76e7d71c97cca96a;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: peers: Add connect and server timeut to peers proxy Only the client timeout was set. Nothing prevent a peer applet to stall during a connect or waiting a message from a remote peer. To avoid any issue, it is important to also set connection and server timeouts. The connect timeout is set to 1s and the server timeout is set to 5s. This patch must be backported to all supported versions. --- diff --git a/src/peers.c b/src/peers.c index 642ad1d24c..1305505451 100644 --- a/src/peers.c +++ b/src/peers.c @@ -3211,7 +3211,9 @@ void peers_setup_frontend(struct proxy *fe) fe->mode = PR_MODE_PEERS; fe->maxconn = 0; fe->conn_retries = CONN_RETRIES; + fe->timeout.connect = MS_TO_TICKS(1000); fe->timeout.client = MS_TO_TICKS(5000); + fe->timeout.server = MS_TO_TICKS(5000); fe->accept = frontend_accept; fe->default_target = &peer_applet.obj_type; fe->options2 |= PR_O2_INDEPSTR | PR_O2_SMARTCON | PR_O2_SMARTACC;