From 7890ae13a6cffbb15b4299bbbcff03eca61ba772 Mon Sep 17 00:00:00 2001 From: Nagendra Tomar Date: Sat, 23 Mar 2024 06:57:13 +0000 Subject: [PATCH] Fix bug in skipping of partially sent iov data When skipping partially sent iov, num_done must be cleared after all previously sent data is skipped, else it will cause more data to be skipped from the next vector. --- lib/socket.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/socket.c b/lib/socket.c index 02efebed..3cc9e916 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -277,6 +277,7 @@ rpc_write_to_socket(struct rpc_context *rpc) } buf += num_done; len -= num_done; + num_done = 0; /* Concatenate continous blocks */ if (last_buf != buf) {