mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-23 14:02:56 +00:00
BUG/MEDIUM: raw_sock: Make sur the fd and conn are sync.
Commit 08fa16e397
made sure
we let the fd layer we didn't want to poll anymore if
we failed to send and sendto() returne EAGAIN.
However, just disabling the polling with fd_stop_send()
while not notifying the connection layer means the
connection layer may believe the polling is activated
and nothing needs to be done when it is wrong.
A better fix is to revamp that whole code, for the
time being, just make sure the fd and connection
layer are properly synchronised.
This should fix the problem recently reported on FreeBSD.
This commit is contained in:
parent
68787ef70a
commit
ac8147446c
@ -378,8 +378,10 @@ static size_t raw_sock_from_buf(struct connection *conn, void *xprt_ctx, const s
|
|||||||
/* if the system buffer is full, don't insist */
|
/* if the system buffer is full, don't insist */
|
||||||
if (ret < try)
|
if (ret < try)
|
||||||
break;
|
break;
|
||||||
if (!count)
|
if (!count) {
|
||||||
fd_stop_send(conn->handle.fd);
|
conn_xprt_stop_send(conn);
|
||||||
|
conn_refresh_polling_flags(conn);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (ret == 0 || errno == EAGAIN || errno == ENOTCONN || errno == EINPROGRESS) {
|
else if (ret == 0 || errno == EAGAIN || errno == ENOTCONN || errno == EINPROGRESS) {
|
||||||
/* nothing written, we need to poll for write first */
|
/* nothing written, we need to poll for write first */
|
||||||
|
Loading…
Reference in New Issue
Block a user