Skip to content

Commit

Permalink
fix: async fn resumed after initiate part failed (#4013)
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo authored Jan 18, 2024
1 parent d0124ba commit 223e810
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/raw/oio/write/multipart_write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,9 @@ where
}
State::Init(fut) => {
let upload_id = ready!(fut.as_mut().poll(cx));
self.upload_id = Some(Arc::new(upload_id?));
// Make sure the future is dropped after it returned ready.
self.state = State::Idle;
self.upload_id = Some(Arc::new(upload_id?));
}
State::Close(_) => {
unreachable!("MultipartWriter must not go into State::Close during poll_write")
Expand Down

0 comments on commit 223e810

Please sign in to comment.