mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-01 22:48:25 +00:00
[MINOR] stream_sock: fix a few wrong empty calculations
This commit is contained in:
parent
9c0fe59612
commit
d2def0fd25
@ -292,7 +292,7 @@ int stream_sock_write_loop(struct stream_interface *si, struct buffer *b)
|
||||
int retval = 1;
|
||||
int ret, max;
|
||||
|
||||
if (!b->l || !b->send_max)
|
||||
if (!b->send_max)
|
||||
return retval;
|
||||
|
||||
/* when we're in this loop, we already know that there is no spliced
|
||||
@ -434,7 +434,7 @@ int stream_sock_write(int fd)
|
||||
*/
|
||||
}
|
||||
|
||||
if ((b->flags & BF_EMPTY) || !b->send_max) {
|
||||
if (!b->splice_len && !b->send_max) {
|
||||
/* the connection is established but we can't write. Either the
|
||||
* buffer is empty, or we just refrain from sending because the
|
||||
* send_max limit was reached. Maybe we just wrote the last
|
||||
@ -457,8 +457,8 @@ int stream_sock_write(int fd)
|
||||
out_may_wakeup:
|
||||
if (b->flags & BF_WRITE_ACTIVITY) {
|
||||
/* update timeout if we have written something */
|
||||
if (b->send_max &&
|
||||
(b->flags & (BF_EMPTY|BF_SHUTW|BF_WRITE_PARTIAL)) == BF_WRITE_PARTIAL)
|
||||
if ((b->send_max || b->splice_len) &&
|
||||
(b->flags & (BF_SHUTW|BF_WRITE_PARTIAL)) == BF_WRITE_PARTIAL)
|
||||
b->wex = tick_add_ifset(now_ms, b->wto);
|
||||
|
||||
out_wakeup:
|
||||
|
Loading…
Reference in New Issue
Block a user