mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-02 02:02:03 +00:00
BUG/MEDIUM: connections: Add the CO_FL_CONNECTED flag if a send succeeded.
If a send succeeded, add the CO_FL_CONNECTED flag, the send may have been called by the upper layers before we even realized we were connected, and we may even read the response before we get the information, and si_cs_recv() has to know if we were connected or not. This should be backported to 1.9.
This commit is contained in:
parent
09a0f03994
commit
f24502ba46
@ -396,6 +396,8 @@ static size_t raw_sock_from_buf(struct connection *conn, const struct buffer *bu
|
||||
count -= ret;
|
||||
done += ret;
|
||||
|
||||
/* A send succeeded, so we can consier ourself connected */
|
||||
conn->flags |= CO_FL_CONNECTED;
|
||||
/* if the system buffer is full, don't insist */
|
||||
if (ret < try)
|
||||
break;
|
||||
|
@ -5723,6 +5723,8 @@ static size_t ssl_sock_from_buf(struct connection *conn, const struct buffer *bu
|
||||
goto out_error;
|
||||
}
|
||||
if (ret > 0) {
|
||||
/* A send succeeded, so we can consier ourself connected */
|
||||
conn->flags |= CO_FL_CONNECTED;
|
||||
conn->xprt_st &= ~SSL_SOCK_SEND_UNLIMITED;
|
||||
count -= ret;
|
||||
done += ret;
|
||||
|
Loading…
Reference in New Issue
Block a user