Skip to content

Commit

Permalink
Fix bug in skipping of partially sent iov data
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Nagendra Tomar committed Mar 23, 2024
1 parent 63750ff commit 7890ae1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7890ae1

Please sign in to comment.