pasta, tcp: Don't reset 'never_read' flag on write retries
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
7ecf693297
commit
e8540b3f26
1 changed files with 3 additions and 2 deletions
5
tcp.c
5
tcp.c
|
@ -2577,7 +2577,7 @@ static void tcp_conn_from_sock(struct ctx *c, union epoll_ref ref,
|
||||||
void tcp_sock_handler_splice(struct ctx *c, union epoll_ref ref,
|
void tcp_sock_handler_splice(struct ctx *c, union epoll_ref ref,
|
||||||
uint32_t events)
|
uint32_t events)
|
||||||
{
|
{
|
||||||
int move_from, move_to, *pipes, eof;
|
int move_from, move_to, *pipes, eof, never_read;
|
||||||
struct tcp_splice_conn *conn;
|
struct tcp_splice_conn *conn;
|
||||||
struct epoll_event ev;
|
struct epoll_event ev;
|
||||||
|
|
||||||
|
@ -2657,9 +2657,10 @@ void tcp_sock_handler_splice(struct ctx *c, union epoll_ref ref,
|
||||||
|
|
||||||
swap:
|
swap:
|
||||||
eof = 0;
|
eof = 0;
|
||||||
|
never_read = 1;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int never_read = 1, retry_write = 1;
|
int retry_write = 1;
|
||||||
ssize_t read, to_write = 0, written;
|
ssize_t read, to_write = 0, written;
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
|
|
Loading…
Reference in a new issue