MEDIUM: session: allow shorter retry delay if timeout connect is small
authorWilly Tarreau <w@1wt.eu>
Fri, 13 Jun 2014 15:04:44 +0000 (17:04 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 13 Jun 2014 15:04:44 +0000 (17:04 +0200)
commitb02906659b510c0c6c052d8aedff54adee395e95
treedf4fe9103275c66dabe08a9df69b2878c5cf6449
parent18bf01e90034c4b8f0ab338d2e6e1e8b64a1df47
MEDIUM: session: allow shorter retry delay if timeout connect is small

As discussed with Dmitry Sivachenko, the default 1-second connect retry
delay can be large for situations where the connect timeout is much smaller,
because it means that an active connection reject will take more time to be
retried than a silent drop, and that does not make sense.

This patch changes this so that the retry delay is the minimum of 1 second
and the connect timeout. That way people running with sub-second connect
timeout will benefit from the shorter reconnect.
src/session.c