aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-09-16 08:26:01 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-09-16 08:50:02 +0200
commite8540b3f2643cd07ad1745bb48b09fd9c208a706 (patch)
tree03b79471e90e4d2f30f448035eadb2e46672d7f9
parent7ecf6932978786910f510beff99afcbf507645ff (diff)
downloadpasst-e8540b3f2643cd07ad1745bb48b09fd9c208a706.tar
passt-e8540b3f2643cd07ad1745bb48b09fd9c208a706.tar.gz
passt-e8540b3f2643cd07ad1745bb48b09fd9c208a706.tar.bz2
passt-e8540b3f2643cd07ad1745bb48b09fd9c208a706.tar.lz
passt-e8540b3f2643cd07ad1745bb48b09fd9c208a706.tar.xz
passt-e8540b3f2643cd07ad1745bb48b09fd9c208a706.tar.zst
passt-e8540b3f2643cd07ad1745bb48b09fd9c208a706.zip
pasta, tcp: Don't reset 'never_read' flag on write retries
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--tcp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tcp.c b/tcp.c
index b398bbe..d5a45e4 100644
--- a/tcp.c
+++ b/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,
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 epoll_event ev;
@@ -2657,9 +2657,10 @@ void tcp_sock_handler_splice(struct ctx *c, union epoll_ref ref,
swap:
eof = 0;
+ never_read = 1;
while (1) {
- int never_read = 1, retry_write = 1;
+ int retry_write = 1;
ssize_t read, to_write = 0, written;
retry: