BUG/MEDIUM: servers: Only set SF_SRV_REUSED if the connection if fully ready.
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 25 Oct 2019 15:00:54 +0000 (17:00 +0200)
committerOlivier Houchard <cognet@ci0.org>
Tue, 29 Oct 2019 13:15:20 +0000 (14:15 +0100)
commite8f5f5d8b228d71333fb60229dc908505baf9222
tree44884950fbd71aeebe924acb1738dccec6fb4172
parent6e8e2ec8494f3ed92f0c80c8382f80072384a4f3
BUG/MEDIUM: servers: Only set SF_SRV_REUSED if the connection if fully ready.

In connect_server(), if we're reusing a connection, only use SF_SRV_REUSED
if the connection is fully ready. We may be using a multiplexed connection
created by another stream that is not yet ready, and may fail.
If we set SF_SRV_REUSED, process_stream() will then not wait for the timeout
to expire, and retry to connect immediately.

This should be backported to 1.9 and 2.0.
This commit depends on 55234e33708c5a584fb9efea81d71ac47235d518.
src/backend.c