mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-12 12:32:53 +02:00
BUG: raw_sock: also consider ENOTCONN in addition to EAGAIN
A failed send() may return ENOTCONN when the connection is not yet established. On Linux, we generally see EAGAIN but on OpenBSD we clearly have ENOTCONN, so let's ensure we poll for write when we encounter this error.
This commit is contained in:
@@ -329,7 +329,7 @@ static int raw_sock_from_buf(struct connection *conn, struct buffer *buf, int fl
|
||||
if (ret < try)
|
||||
break;
|
||||
}
|
||||
else if (ret == 0 || errno == EAGAIN) {
|
||||
else if (ret == 0 || errno == EAGAIN || errno == ENOTCONN) {
|
||||
/* nothing written, we need to poll for write first */
|
||||
__conn_data_poll_send(conn);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user