Skip to content

Commit b29ed97

Browse files
committed
Fix
1 parent 82c767b commit b29ed97

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tokio/src/fs/read_uring.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,12 @@ async fn op_read(
156156
*offset += size_read as u64;
157157
*read_len -= size_read;
158158

159-
if read_len > 0 {
160-
continue;
159+
if *read_len == 0 || size_read == 0 {
160+
return Ok((size_read, r_fd, r_buf));
161161
}
162162

163-
return Ok((size_read, r_fd, r_buf));
163+
buf = r_buf;
164+
fd = r_fd;
164165
}
165166
}
166167
}

0 commit comments

Comments
 (0)