Skip to content

Commit b286d1c

Browse files
authored
RUST-1698 Fix reading gridfs chunks from async-std file stream (#950)
1 parent 5b54bb6 commit b286d1c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/gridfs/upload.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ where
231231
n => n,
232232
};
233233
total_bytes_read += bytes_read;
234+
if total_bytes_read == buf.len() {
235+
break;
236+
}
234237
}
235238

236239
Ok(total_bytes_read)

0 commit comments

Comments
 (0)