mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 17:17:06 +02:00
[CLEANUP] stream_sock: remove unneeded FL_TCP and factor out test
The FL_TCP flag was a leftover from the old days we were using TCP_CORK. With MSG_MORE it's not needed anymore so we can remove the condition and sensibly simplify the test.
This commit is contained in:
parent
8f8b492295
commit
f8ca19bcd9
@ -643,13 +643,10 @@ static int stream_sock_write_loop(struct stream_interface *si, struct buffer *b)
|
|||||||
if (MSG_NOSIGNAL && MSG_MORE) {
|
if (MSG_NOSIGNAL && MSG_MORE) {
|
||||||
unsigned int send_flag = MSG_DONTWAIT | MSG_NOSIGNAL;
|
unsigned int send_flag = MSG_DONTWAIT | MSG_NOSIGNAL;
|
||||||
|
|
||||||
if (((b->to_forward && b->to_forward != BUF_INFINITE_FORWARD) ||
|
if ((b->to_forward && b->to_forward != BUF_INFINITE_FORWARD) ||
|
||||||
((b->flags & (BF_SHUTW|BF_SHUTW_NOW|BF_HIJACK)) == BF_SHUTW_NOW && (max == b->send_max)) ||
|
(b->flags & BF_EXPECT_MORE) ||
|
||||||
(max != b->l && max != b->send_max))
|
((b->flags & (BF_SHUTW|BF_SHUTW_NOW|BF_HIJACK)) == BF_SHUTW_NOW && (max == b->send_max)) ||
|
||||||
&& (fdtab[si->fd].flags & FD_FL_TCP)) {
|
(max != b->l && max != b->send_max)) {
|
||||||
send_flag |= MSG_MORE;
|
|
||||||
}
|
|
||||||
else if (b->flags & BF_EXPECT_MORE) {
|
|
||||||
send_flag |= MSG_MORE;
|
send_flag |= MSG_MORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user