Skip to content

Commit 96d4d8d

Browse files
committed
fix multipart bug with empty payload
1 parent 77151c2 commit 96d4d8d

File tree

1 file changed

+3
-1
lines changed
  • libsql-wal/src/storage/backend

1 file changed

+3
-1
lines changed

libsql-wal/src/storage/backend/s3.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,9 @@ impl<IO: Io> S3Backend<IO> {
310310
let mut current_chunk_len = 0;
311311
tokio::pin!(data);
312312
loop {
313-
let Some(frame) = poll_fn(|cx| data.as_mut().poll_frame(cx)).await else {
313+
let next_frame_fut = poll_fn(|cx| data.as_mut().poll_frame(cx));
314+
let Some(frame) = next_frame_fut.await else {
315+
let _ = s_chunks.send(current_chunk_file).await;
314316
break;
315317
};
316318
let frame = frame?;

0 commit comments

Comments
 (0)