Skip to content

Only flush buffered multi-part data on poll_shutdown not on poll_flush #205

@liningpan

Description

@liningpan

Describe the bug
Although the multipart writer implements AsyncWrite, it is incompatible with the utility tokio::io::copy function in tokio.

The reason seems to be the copy function in tokio polls flush frequently (https://docs.rs/tokio/1.23.0/src/tokio/io/util/copy.rs.html#99). However, in this case, each call to flush will cause put_multipart_part request to be sent.

To Reproduce

Expected behavior

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions