From: Olivier Houchard Date: Thu, 13 Dec 2018 14:37:25 +0000 (+0100) Subject: BUG/MEDIUM: connections: Remove CS_FL_EOS | CS_FL_REOS on retry. X-Git-Tag: v1.9-dev11~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab8b075ff0983b63880fcd43697e8d94b8533771;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: connections: Remove CS_FL_EOS | CS_FL_REOS on retry. CS_FL_EOS | CS_FL_REOS can be set by the mux if the connection failed, so make sure we remove them before retrying to connect, or it may lead to a premature close of the connection. --- diff --git a/src/backend.c b/src/backend.c index 24fcb72476..f494773108 100644 --- a/src/backend.c +++ b/src/backend.c @@ -1132,7 +1132,7 @@ int connect_server(struct stream *s) old_conn = srv_conn = cs_conn(srv_cs); if (old_conn) { old_conn->flags &= ~(CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_SOCK_WR_SH); - srv_cs->flags &= ~CS_FL_ERROR; + srv_cs->flags &= ~(CS_FL_ERROR | CS_FL_EOS | CS_FL_REOS); reuse = 1; } } else {