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.
This commit is contained in:
Christopher Faulet 2022-08-29 11:32:26 +02:00
parent 42a0662910
commit 13db4bdbc6

View File

@ -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;